Publish book to Pages only after successful build

This commit is contained in:
andrussal 2025-12-03 05:03:15 +01:00
parent b3ecd035db
commit 7340eb8546
2 changed files with 38 additions and 4 deletions

View File

@ -9,10 +9,14 @@ env:
jobs:
build_nomos_binaries:
runs-on:
- self-hosted
- macOS
- X64
strategy:
matrix:
include:
- name: macos
runs-on: [self-hosted, macOS, X64]
- name: linux
runs-on: ubuntu-latest
runs-on: ${{ matrix.runs-on }}
env:
NOMOS_CIRCUITS: ${{ github.workspace }}/.tmp/nomos-circuits
CARGO_INCREMENTAL: 0
@ -21,6 +25,12 @@ jobs:
CARGO_TARGET_DIR: ${{ github.workspace }}/.tmp/nomos-target
steps:
- uses: actions/checkout@v4
- name: Install system dependencies (Linux)
if: runner.os == 'Linux'
run: |
set -euo pipefail
sudo apt-get update
sudo apt-get install -y clang llvm-dev libclang-dev pkg-config cmake libssl-dev rsync libgmp10 libgmp-dev libgomp1 nasm
- name: Install nomos circuits
run: |
./scripts/setup-nomos-circuits.sh v0.3.1 "$NOMOS_CIRCUITS"

View File

@ -8,6 +8,10 @@ on:
env:
CARGO_TERM_COLOR: always
NOMOS_NODE_REV: 2f60a0372c228968c3526c341ebc7e58bbd178dd
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: lint-${{ github.ref }}
@ -431,3 +435,23 @@ jobs:
run: mdbook build book
- name: Check links
run: mdbook-linkcheck book
- name: Upload book artifact for Pages
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
uses: actions/upload-pages-artifact@v3
with:
path: book/book
deploy_book:
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
needs: book
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
permissions:
pages: write
id-token: write
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4