Apply facto-stack Antora compose to docs.opensh.org hub #69
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Docs | |
| on: | |
| push: | |
| branches: [main, master] | |
| paths: | |
| - "docs/**" | |
| - "lib/**" | |
| - "scripts/**" | |
| - "CONTRIBUTING.md" | |
| - "test/**" | |
| - "supplemental-ui/**" | |
| - "antora-playbook.yml" | |
| - "antora-playbook-local.yml" | |
| - "package.json" | |
| - "pnpm-lock.yaml" | |
| - ".github/workflows/docs.yml" | |
| pull_request: | |
| branches: [main, master] | |
| workflow_dispatch: | |
| repository_dispatch: | |
| types: [docs-rebuild] | |
| schedule: | |
| - cron: "0 6 * * 1" | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: pages-docs | |
| cancel-in-progress: true | |
| jobs: | |
| diagram-audit: | |
| name: Themed SVG and diagram checks | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22" | |
| cache: "pnpm" | |
| cache-dependency-path: pnpm-lock.yaml | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Sync themed-svg browser runtime | |
| run: pnpm run diagrams:sync | |
| - name: Run diagram and dark-mode audits | |
| # Static only: no mermaid-cli / Puppeteer. See CONTRIBUTING.md and scripts/DIAGRAM-AUDITS.md. | |
| run: pnpm run diagrams:check:all | |
| build: | |
| name: Build Antora docs | |
| runs-on: ubuntu-latest | |
| needs: diagram-audit | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22" | |
| cache: "pnpm" | |
| cache-dependency-path: pnpm-lock.yaml | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Sync themed-svg browser runtime | |
| run: pnpm run diagrams:sync | |
| - name: Build Antora docs | |
| id: antora | |
| uses: antora-supplemental/antora-build-action@v2 | |
| with: | |
| playbook: antora-playbook.yml | |
| working_directory: . | |
| output_dir: build/site | |
| node_version: "22" | |
| install_dependencies: false | |
| setup_pnpm: false | |
| setup_node: false | |
| create_nojekyll: true | |
| - name: Upload Pages artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: ${{ steps.antora.outputs.site-path }} | |
| deploy: | |
| name: Deploy to GitHub Pages | |
| runs-on: ubuntu-latest | |
| needs: build | |
| if: github.event_name != 'pull_request' | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deploy.outputs.page_url }} | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deploy | |
| uses: actions/deploy-pages@v4 |