docs.yml 1.5 KB

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