docs.yml 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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. - uses: actions/checkout@v3
  15. # NOTE: Comment out when https://github.com/rust-lang/mdBook/pull/1306 is merged and released
  16. # - name: Setup mdBook
  17. # uses: peaceiris/actions-mdbook@v1
  18. # with:
  19. # mdbook-version: "0.4.10"
  20. # NOTE: Delete when the previous one is enabled
  21. - name: Setup mdBook
  22. run: |
  23. cargo install mdbook --git https://github.com/Ruin0x11/mdBook.git --branch localization --rev e74fdb1
  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. - name: Deploy 🚀
  29. uses: JamesIves/github-pages-deploy-action@v4.4.1
  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/nightly
  34. repository-name: dioxuslabs/docsite
  35. clean: false
  36. token: ${{ secrets.DEPLOY_KEY }} # let's pretend I don't need it for now