Skip to content

Support dynamic checkout sets from GitHub Actions expressions #31605

Support dynamic checkout sets from GitHub Actions expressions

Support dynamic checkout sets from GitHub Actions expressions #31605

Workflow file for this run

name: Doc Build - Deploy
on:
schedule:
# Daily rebuild
# (GitHub uses UTC for cron schedules.)
- cron: '0 6 * * *'
workflow_dispatch:
release:
types: [created]
pull_request:
paths:
- 'docs/**'
- '!docs/adr/**'
- '.github/workflows/docs.yml'
push:
branches:
- main
paths:
- 'docs/**'
- '!docs/adr/**'
- 'cmd/gh-aw-wasm/**'
- 'scripts/bundle-wasm-docs.sh'
- '.github/workflows/docs.yml'
- 'Makefile'
# Allow this job to clone the repo
permissions:
contents: read
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages-${{ github.ref }}"
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
lfs: true
- name: Checkout agentics workflows
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: githubnext/agentics
path: .agentics
persist-credentials: false
sparse-checkout: workflows
- name: Setup Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v6
with:
node-version: '24'
cache: 'npm'
cache-dependency-path: 'docs/package-lock.json'
- name: Set up Go
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v6
with:
go-version-file: go.mod
cache: true
- name: Build WebAssembly compiler for docs
run: ./scripts/bundle-wasm-docs.sh
- name: Install dependencies
working-directory: ./docs
run: npm ci --legacy-peer-deps
- name: Build documentation
working-directory: ./docs
env:
AGENTICS_WORKFLOWS_DIR: ${{ github.workspace }}/.agentics/workflows
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npm run build
- name: Upload build artifacts
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch'
uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0
with:
path: ./docs/dist
deploy:
# make this conditional on the branch being main
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch'
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@368f82528645a54fb793d4d04e342629a3f51346 # v5.0.1