1
0

docs.yml 1.4 KB

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