1
0

dev_deploy.yml 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. name: Dev Deploy
  2. on:
  3. push:
  4. branches: [ 'dev' ]
  5. jobs:
  6. deploy:
  7. runs-on: ubuntu-latest
  8. env:
  9. ruby-version: 2.5
  10. steps:
  11. - uses: actions/checkout@v2
  12. - name: Set up Ruby
  13. uses: ruby/setup-ruby@v1
  14. with:
  15. ruby-version: ${{ env.ruby-version }}
  16. - uses: actions/cache@v2
  17. with:
  18. path: vendor/bundle
  19. key: gems-${{ runner.os }}-${{ matrix.ruby-version }}-${{ hashFiles('**/Gemfile.lock') }}
  20. restore-keys: |
  21. gems-${{ runner.os }}-${{ matrix.ruby-version }}-
  22. gems-${{ runner.os }}-
  23. - run: bundle config set deployment 'true'
  24. - name: bundle install
  25. run: |
  26. bundle config path vendor/bundle
  27. bundle install --jobs 4 --retry 3
  28. - run: bundle exec middleman build
  29. - name: Push to Docker Hub
  30. uses: docker/build-push-action@v1
  31. with:
  32. username: ${{ secrets.DOCKER_USERNAME }}
  33. password: ${{ secrets.DOCKER_ACCESS_KEY }}
  34. repository: slatedocs/slate
  35. tag_with_ref: true
  36. - name: Deploy
  37. uses: peaceiris/[email protected]
  38. with:
  39. github_token: ${{ secrets.GITHUB_TOKEN }}
  40. destination_dir: dev
  41. publish_dir: ./build
  42. keep_files: true