-
Notifications
You must be signed in to change notification settings - Fork 1
66 lines (61 loc) · 2.11 KB
/
main.yaml
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
on:
push:
branches:
- master
- v1.11_RC
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
doc_build_job:
runs-on: ubuntu-latest
# This project MUST be given permission to use the image blow. at
# Package settings-> Manage action access of the project hosting the
# package
# Your project MUST contain empty .nojekyll file. Github Pages will
# discard everything starting with '_' i.e. the stylefiles.
container: 'ghcr.io/thesystemdevelopmentkit/thesdktestimage:latest'
name: Build documentation
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Documentation builder action
run: cd doc && rm -rf build && make html && cd .. && touch ./doc//build/html/.nojekyll
- name: GIT commit and push documentation
env:
CI_COMMIT_MESSAGE: Continuous Integration documentation update
CI_COMMIT_AUTHOR: Continuous Integration
run: |
git config --global --add safe.directory /__w/inverter/inverter
git config --global user.name "${{ env.CI_COMMIT_AUTHOR }}"
git config --global user.email "${GITHUB_ACTOR}@noreply.github.com"
git add doc/build \
&& git commit -m "${{ env.CI_COMMIT_MESSAGE }}" \
&& git push \
|| echo "Nothing to update"
pages_deploy:
needs: doc_build_job
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
# Upload entire repository
path: './doc/build/html'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4