Skip to content

feat: add antora_build script #12

feat: add antora_build script

feat: add antora_build script #12

Workflow file for this run

---
# SPDX-FileCopyrightText: © 2024 Sebastian Davids <[email protected]>
# SPDX-License-Identifier: Apache-2.0
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions
name: gh-pages
on: # yamllint disable-line rule:truthy
push:
branches:
- main
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
pages: write
id-token: write
jobs:
build:
runs-on: ubuntu-22.04
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Checkout
# https://github.com/actions/checkout/releases
uses: actions/[email protected]
- name: Classify changes
# https://github.com/dorny/paths-filter/releases
uses: dorny/[email protected]
id: changes
with:
filters: |
docs:
- 'docs/**'
- if: steps.changes.outputs.docs == 'true'
name: Configure Pages
# https://github.com/actions/configure-pages
uses: actions/[email protected]
- if: steps.changes.outputs.docs == 'true'
name: Setup Node.js
# https://github.com/actions/setup-node/releases
uses: actions/[email protected]
with:
node-version: 20.18.0
- if: steps.changes.outputs.docs == 'true'
name: Install Antora
run: npm i [email protected]
- if: steps.changes.outputs.docs == 'true'
name: Generate Site
run: npx antora docs/antora-playbook.yml
- if: steps.changes.outputs.docs == 'true'
name: Upload Artifacts
# https://github.com/actions/upload-pages-artifact
uses: actions/[email protected]
with:
path: docs/build/site
- if: steps.changes.outputs.docs == 'true'
name: Deploy to GitHub Pages
id: deployment
# https://github.com/actions/deploy-pages
uses: actions/[email protected]