deploy.yml 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. name: Deploy Site
  2. on:
  3. push:
  4. branches:
  5. - master
  6. jobs:
  7. deploy:
  8. runs-on: ubuntu-latest
  9. steps:
  10. - uses: actions/checkout@v3
  11. - uses: actions/setup-node@v3
  12. with:
  13. node-version: 20
  14. cache: 'yarn'
  15. - name: Build theme with node
  16. run: |
  17. cd ${{ github.workspace }}/site/_themes
  18. yarn install --frozen-lockfile
  19. yarn build
  20. rm -rf ../assets/js/themes
  21. mv dist/themes.html ../_includes/themes.html
  22. mv dist ../assets/js/themes
  23. - uses: ruby/setup-ruby@v1
  24. with:
  25. ruby-version: 2.6
  26. bundler-cache: true
  27. - name: Build page with Jekyll
  28. run: bundle exec jekyll build
  29. - name: Checkout gh-pages branch
  30. uses: actions/checkout@v3
  31. with:
  32. ref: 'gh-pages'
  33. path: './gh-pages'
  34. - name: Move versions to _gh_pages
  35. run: |
  36. mv gh-pages/versions _gh_pages
  37. rm -rf gh-pages
  38. - name: Deploy to GitHub Pages
  39. uses: JamesIves/github-pages-deploy-action@v4.3.3
  40. with:
  41. branch: gh-pages
  42. folder: _gh_pages