-
Notifications
You must be signed in to change notification settings - Fork 8
61 lines (50 loc) · 1.41 KB
/
publish_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
name: PublishDocs
# make the documentation up to date with the develop branch
on:
push:
branches:
- develop
paths:
- .github/workflows/publish_docs.yml
- docs/examples/**
- docs/mkdocs/**
workflow_dispatch:
# no cancellation during uploads to avoid broken publications
concurrency:
group: documentation
cancel-in-progress: false
permissions:
contents: read
pages: write
id-token: write
jobs:
build:
if: github.repository == 'fktn-k/fkYAML'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Build examples
run: |
cmake -B ${{github.workspace}}/build -S ${{github.workspace}} -DCMAKE_BUILD_TYPE=Debug -DFK_YAML_BUILD_EXAMPLES=ON
cmake --build ${{github.workspace}}/build --config Debug
- name: Build documentation
run: make -C docs/mkdocs build
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Upload API documents
uses: actions/upload-pages-artifact@v3
with:
path: ${{github.workspace}}/docs/mkdocs/site
deploy:
if: github.repository == 'fktn-k/fkYAML'
needs: build
environment:
name: github-pages
url: ${{steps.deployment.outputs.page_url}}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4