docs stable.yml 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. name: docs stable
  2. on:
  3. workflow_dispatch:
  4. concurrency:
  5. group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
  6. cancel-in-progress: true
  7. jobs:
  8. build-deploy:
  9. runs-on: ubuntu-latest
  10. environment: docs
  11. steps:
  12. # NOTE: Comment out when https://github.com/rust-lang/mdBook/pull/1306 is merged and released
  13. # - name: Setup mdBook
  14. # uses: peaceiris/actions-mdbook@v1
  15. # with:
  16. # mdbook-version: "0.4.10"
  17. # NOTE: Delete when the previous one is enabled
  18. - name: Setup mdBook
  19. run: |
  20. cargo install mdbook --git https://github.com/Demonthos/mdBook.git --branch master
  21. - uses: actions/checkout@v4
  22. - name: Build
  23. run: cd docs &&
  24. cd guide && mdbook build -d ../nightly/guide && cd .. &&
  25. cd router && mdbook build -d ../nightly/router && cd ..
  26. # cd reference && mdbook build -d ../nightly/reference && cd .. &&
  27. # cd fermi && mdbook build -d ../nightly/fermi && cd ..
  28. - name: Deploy 🚀
  29. uses: JamesIves/github-pages-deploy-action@v4.5.0
  30. with:
  31. branch: gh-pages # The branch the action should deploy to.
  32. folder: docs/nightly # The folder the action should deploy.
  33. target-folder: docs
  34. repository-name: dioxuslabs/docsite
  35. clean: false
  36. token: ${{ secrets.DEPLOY_KEY }} # let's pretend I don't need it for now