-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (66 loc) · 2.27 KB
/
Copy pathpublish.yml
File metadata and controls
68 lines (66 loc) · 2.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
---
# SPDX-FileCopyrightText: © 2024 Sebastian Davids <sdavids@gmx.de>
# 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:
# https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2404-Readme.md
runs-on: ubuntu-24.04
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Checkout
# https://github.com/actions/checkout/releases
uses: actions/checkout@v6.0.2
- name: Classify changes
# https://github.com/dorny/paths-filter/releases
uses: dorny/paths-filter@v4.0.1
id: changes
with:
filters: |
docs:
- 'docs/**'
- if: steps.changes.outputs.docs == 'true'
name: Configure Pages
# https://github.com/actions/configure-pages
uses: actions/configure-pages@v6.0.0
- if: steps.changes.outputs.docs == 'true'
name: Install Node.js
# https://github.com/actions/setup-node/releases
uses: actions/setup-node@v6.4.0
with:
# https://nodejs.org/en/about/previous-releases#looking-for-the-latest-release-of-a-version-branch
node-version: 24.15.0
- if: steps.changes.outputs.docs == 'true'
name: Install Antora
# https://docs.antora.org/antora/latest/whats-new/
run: npm install antora@3.1.14
- 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/upload-pages-artifact@v5.0.0
with:
include-hidden-files: true
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/deploy-pages@v5.0.0