docs-build-deploy.yml 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. name: Build & deploy Jekyll documentation
  2. on:
  3. # Runs on pushes and PRs targeting the default branch
  4. push:
  5. branches: ["edge"]
  6. paths:
  7. - 'docs/**'
  8. - '.github/workflows/docs-build-deploy.yml'
  9. pull_request:
  10. branches: ["edge"]
  11. paths:
  12. - 'docs/**'
  13. - '.github/workflows/docs-build-deploy.yml'
  14. # Allows you to run this workflow manually from the Actions tab (deploy)
  15. workflow_dispatch:
  16. permissions: {}
  17. concurrency:
  18. group: docs-build-deploy-${{ github.ref }}
  19. cancel-in-progress: false
  20. jobs:
  21. # Build job (the only job that runs in PRs to test the build)
  22. build:
  23. name: build
  24. runs-on: ubuntu-26.04
  25. permissions:
  26. contents: read
  27. pages: read # For the "Setup Pages" step
  28. steps:
  29. - name: Checkout
  30. uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
  31. with:
  32. persist-credentials: false
  33. - name: Setup Ruby
  34. uses: ruby/setup-ruby@7f797815d8adceb1c412e7abefdd1ab4abc47a5f # v1.335.0
  35. env:
  36. BUNDLE_FROZEN: true # Always respect Gemfile.lock (explicit)
  37. with:
  38. ruby-version: '3.4.9'
  39. bundler-cache: true # runs 'bundle install' and caches installed gems automatically
  40. cache-version: 1 # Increment this number if you need to re-download cached gems
  41. working-directory: docs
  42. - name: Build with Jekyll
  43. run: |
  44. cd docs
  45. bundle exec jekyll build --destination ../_site
  46. - name: Setup Pages
  47. uses: actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d # v6.0.0
  48. if: ${{ github.ref == 'refs/heads/edge' }}
  49. - name: Upload artifact
  50. uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0
  51. # Deployment job (skipped in PRs)
  52. deploy:
  53. name: deploy
  54. if: ${{ github.ref == 'refs/heads/edge' }}
  55. environment:
  56. name: github-pages
  57. url: ${{ steps.deployment.outputs.page_url }}
  58. runs-on: ubuntu-26.04
  59. permissions:
  60. pages: write # For deploying the page
  61. id-token: write # For authorizing the deployment
  62. needs: build
  63. steps:
  64. - name: Deploy to GitHub Pages
  65. id: deployment
  66. uses: actions/deploy-pages@368f82528645a54fb793d4d04e342629a3f51346 # v5.0.1