deploy-docs.yml 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. # This is a basic workflow to help you get started with Actions
  2. name: Deploy GitHub Pages
  3. # Controls when the workflow will run
  4. on:
  5. # Triggers the workflow on push or pull request events but only for the "main" branch
  6. push:
  7. tags:
  8. - "v*"
  9. # A workflow run is made up of one or more jobs that can run sequentially or in parallel
  10. jobs:
  11. # This workflow contains a single job called "build"
  12. build:
  13. # The type of runner that the job will run on
  14. runs-on: ubuntu-latest
  15. # Steps represent a sequence of tasks that will be executed as part of the job
  16. steps:
  17. # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
  18. - name: Checkout code
  19. uses: actions/checkout@v4
  20. - name: Setup Node.js
  21. uses: actions/setup-node@v4
  22. with:
  23. node-version: "20"
  24. registry-url: "https://registry.npmjs.org"
  25. - name: Install dependencies
  26. run: npm install
  27. working-directory: ./docs
  28. - name: Run build site
  29. run: npm run build
  30. working-directory: ./docs
  31. - name: Deploy to GitHub Pages
  32. uses: peaceiris/actions-gh-pages@v4
  33. with:
  34. github_token: ${{ secrets.GITHUB_TOKEN }}
  35. publish_dir: ./docs/dist