mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-24 20:30:14 +01:00
In addition to the general updates, this switches to a required python 3.10 for pre-commit (3.9 is losing support from black). Note endpoints for build actions are expanding significantly: see https://app.stepsecurity.io/github/carbon-language/carbon-lang/actions/runs/22779388360?tab=recommendations&jobId=66080970460 for example, I think just the sources are being increased as a side-effect of updates (and possibly also things not performing as well as they should have before). Similarly allowing sudo in pre-commit because it was actually causing errors in part of build setup, which used sudo to remove files. Assisted-by: Google Antigravity with Gemini
42 lines
1.3 KiB
YAML
42 lines
1.3 KiB
YAML
# Part of the Carbon Language project, under the Apache License v2.0 with LLVM
|
|
# Exceptions. See /LICENSE for license information.
|
|
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
|
|
name: GitHub Pages CI
|
|
|
|
on:
|
|
pull_request:
|
|
|
|
# Cancel previous workflows on the PR when there are multiple fast commits.
|
|
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#concurrency
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
# Build job
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Harden Runner
|
|
uses: step-security/harden-runner@58077d3c7e43986b6b15fba718e8ea69e387dfcc # v2.15.1
|
|
with:
|
|
egress-policy: audit
|
|
|
|
- name: Checkout
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
- name: Prebuild actions
|
|
run: ./website/prebuild.py
|
|
- name: Setup Ruby
|
|
uses: ruby/setup-ruby@6ca151fd1bfcfd6fe0c4eb6837eb0584d0134a0c # v1.290.0
|
|
with:
|
|
# Runs 'bundle install' and caches installed gems automatically.
|
|
bundler-cache: true
|
|
# Increment this number if you need to re-download cached gems.
|
|
cache-version: 0
|
|
- name: Build with Jekyll
|
|
run: bundle exec jekyll build
|