-
Notifications
You must be signed in to change notification settings - Fork 302
57 lines (48 loc) · 1.34 KB
/
ghpages.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
name: Deploy Docs to GitHub
on:
release:
types: [published]
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-22.04
steps:
- name: 'Checkout'
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: 'Get latest tag'
run: echo "GIT_LATEST_TAG=$(git tag | grep '^[0-9]\+\.[0-9]\+\?\.[0-9]\+\?$' | sort -V -r | head -n1)" >> $GITHUB_ENV
- name: 'Variables'
run: |
echo $GITHUB_REF_NAME
echo $GIT_LATEST_TAG
- name: 'Install prerequisites'
if: github.ref_name == env.GIT_LATEST_TAG
run: |
sudo apt-get update
sudo apt-get install -y \
libdrm-dev \
doxygen \
meson \
- name: 'Build the Docs'
if: github.ref_name == env.GIT_LATEST_TAG
run: meson setup _build -D enable_docs=true && meson compile -C _build
- name: 'Upload the artifacts'
if: github.ref_name == env.GIT_LATEST_TAG
uses: actions/upload-pages-artifact@v2
with:
path: "_build/doc/html-out"
- name: 'Deploy to GitHub Pages'
if: github.ref_name == env.GIT_LATEST_TAG
id: deployment
uses: actions/deploy-pages@v2