deploy.yml 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. name: Docusaurus Build & Deploy
  2. on:
  3. push:
  4. branches:
  5. - docs
  6. # Review gh actions docs if you want to further define triggers, paths, etc
  7. # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on
  8. jobs:
  9. deploy:
  10. name: Deploy to GitHub Pages
  11. runs-on: ubuntu-latest
  12. steps:
  13. - uses: actions/checkout@v3
  14. - uses: actions/setup-node@v3
  15. with:
  16. node-version: 18
  17. cache: npm
  18. - name: Install dependencies
  19. run: yarn install --frozen-lockfile
  20. - name: Build website
  21. run: yarn build
  22. # Popular action to deploy to GitHub Pages:
  23. # Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus
  24. - name: Deploy to GitHub Pages
  25. uses: peaceiris/actions-gh-pages@v3
  26. with:
  27. github_token: ${{ secrets.GITHUB_TOKEN }}
  28. # Build output to publish to the `gh-pages` branch:
  29. publish_dir: ./build
  30. # The following lines assign commit authorship to the official
  31. # GH-Actions bot for deploys to `gh-pages` branch:
  32. # https://github.com/actions/checkout/issues/13#issuecomment-724415212
  33. # The GH actions bot is used by default if you didn't specify the two fields.
  34. # You can swap them out with your own user credentials.
  35. user_name: github-actions[bot]
  36. user_email: 41898282+github-actions[bot]@users.noreply.github.com