-
Notifications
You must be signed in to change notification settings - Fork 47
71 lines (62 loc) · 1.83 KB
/
doc-generation.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
---
name: Generating documentation
on:
push:
branches:
- 'develop'
tags:
- 'v*'
workflow_dispatch:
jobs:
build-and-deploy:
runs-on: ubuntu-latest
container:
image: ghcr.io/cp2k/dbcsr-build-env-ubuntu-22.04:develop
volumes:
- "/etc/ssh/ssh_known_hosts:/etc/ssh/ssh_known_hosts:ro"
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
- name: Configure
run: |
mkdir -p build
cd build
cmake -G Ninja \
-DUSE_MPI=ON \
-DUSE_OPENMP=ON \
-DUSE_SMM=libxsmm \
-DMPI_EXECUTABLE_SUFFIX=.mpich \
..
- name: Build
run: |
cmake --build build -- doc
touch build/doc/.nojekyll
- name: Configure git to trust the workspace despite the different owner
run:
git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Deploy Development Documentation
if: github.repository == 'cp2k/dbcsr' && github.ref == 'refs/heads/develop'
uses: JamesIves/github-pages-deploy-action@releases/v4
with:
branch: gh-pages
folder: build/doc
target-folder: develop
clean: true
clean-exclude: |
releases/
ssh-key: ${{ secrets.SSH_DEPLOY_KEY }}
- name: Get the release version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\/v/}
shell: bash
- name: Deploy Release Documentation
if: github.repository == 'cp2k/dbcsr' && contains(github.ref, 'tags')
uses: JamesIves/github-pages-deploy-action@releases/v4
with:
branch: gh-pages
folder: build/doc
target-folder: 'releases/v${{ steps.get_version.outputs.VERSION }}'
ssh-key: ${{ secrets.SSH_DEPLOY_KEY }}
# vim: set ts=2 sw=2 tw=0 :