-
Notifications
You must be signed in to change notification settings - Fork 297
85 lines (72 loc) · 2.65 KB
/
docs.yml
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
---
# This is a slightly adjusted version of the Jekyll pages starter workflow.
# https://github.com/actions/starter-workflows/blob/main/pages/jekyll-gh-pages.yml
name: Docs
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
# 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.
#
# Since pull requests use a unique artifact name and won't be deployed, they
# shouldn't be limited. Use a unique group name in that case.
concurrency:
group: "pages${{ github.event_name == 'pull_request' && format('-pr{0}', github.event.number) }}"
cancel-in-progress: false
jobs:
build:
name: Build documentation
runs-on: ubuntu-latest
container: registry.ci.openshift.org/coreos/fcos-buildroot:testing-devel
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: GH actions checkout post
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
# This is taken from ci/travis-install.sh but should probably be
# refactored.
- name: Install dependencies
run: ./ci/installdeps.sh
- name: Build API docs and manpages
run: |
./autogen.sh --enable-gtk-doc --enable-man --enable-man-html
make -C apidoc
make manhtml
- name: Copy API docs and manpages
run: ./docs/prep-docs.sh
- name: Build jekyll docs
uses: actions/jekyll-build-pages@v1
with:
source: ./docs
destination: ./docs/_site
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: docs/_site
# The default name is github-pages to match actions/deploy-pages. For
# PRs use a unique name so results can be inspected without
# interfering with real deployments.
name: "github-pages${{ github.event_name == 'pull_request' && format('-pr{0}', github.event.number) }}"
deploy:
name: Deploy documentation
runs-on: ubuntu-latest
needs: build
# Skip deployment on pull requests.
if: ${{ github.event_name != 'pull_request' }}
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
# Grant permissions to deploy to Pages. The id-token permission is needed
# to verify the deployment originates from an appropriate source.
permissions:
contents: read
pages: write
id-token: write
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4