gh_pages_ci.yaml 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. # Part of the Carbon Language project, under the Apache License v2.0 with LLVM
  2. # Exceptions. See /LICENSE for license information.
  3. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. name: GitHub Pages CI
  5. on:
  6. pull_request:
  7. # Cancel previous workflows on the PR when there are multiple fast commits.
  8. # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#concurrency
  9. concurrency:
  10. group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
  11. cancel-in-progress: true
  12. permissions:
  13. contents: read
  14. jobs:
  15. # Build job
  16. build:
  17. runs-on: ubuntu-latest
  18. steps:
  19. - name: Harden Runner
  20. uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1
  21. with:
  22. egress-policy: audit
  23. - name: Checkout
  24. uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
  25. - name: Prebuild actions
  26. run: ./website/prebuild.py
  27. - name: Setup Ruby
  28. uses: ruby/setup-ruby@a6e6f86333f0a2523ece813039b8b4be04560854 # v1.190.0
  29. with:
  30. # Runs 'bundle install' and caches installed gems automatically.
  31. bundler-cache: true
  32. # Increment this number if you need to re-download cached gems.
  33. cache-version: 0
  34. - name: Build with Jekyll
  35. run: bundle exec jekyll build