1
0

docs.yml 1.5 KB

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