1
0

wiki.yml 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. name: Build & Deploy mdBook Site
  2. on:
  3. push:
  4. branches: [master]
  5. # Allows you to run this workflow manually from the Actions tab
  6. workflow_dispatch:
  7. # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
  8. permissions:
  9. contents: read
  10. pages: write
  11. id-token: write
  12. # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
  13. # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
  14. concurrency:
  15. group: "pages"
  16. cancel-in-progress: false
  17. jobs:
  18. # Build job
  19. build:
  20. runs-on: ubuntu-latest
  21. steps:
  22. - uses: actions/checkout@v3
  23. - name: Install Rust
  24. run: |
  25. curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf -y | sh
  26. rustup update
  27. - name: Install mdbook & plugins
  28. uses: taiki-e/install-action@v2.18.6
  29. with:
  30. tool: mdbook@0.4.36,mdbook-admonish@1.14.0,mdbook-linkcheck@0.7.7,mdbook-template@1.1.0,mdbook-emojicodes@0.3.0,mdbook-embedify@0.2.11
  31. - name: Setup Pages
  32. id: pages
  33. uses: actions/configure-pages@v3
  34. - name: Build with mdBook
  35. run: cd Wiki && mdbook build
  36. - name: Upload artifact
  37. uses: actions/upload-pages-artifact@v3
  38. with:
  39. path: ./Wiki/book/html
  40. # Deployment job
  41. deploy:
  42. environment:
  43. name: github-pages
  44. url: ${{ steps.deployment.outputs.page_url }}
  45. runs-on: ubuntu-latest
  46. needs: build
  47. if: github.ref == 'refs/heads/master'
  48. steps:
  49. - name: Deploy to GitHub Pages
  50. id: deployment
  51. uses: actions/deploy-pages@v4