-
Notifications
You must be signed in to change notification settings - Fork 47
46 lines (43 loc) · 1.49 KB
/
deploy_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
name: Build and deploy docs
on:
push:
branches: [ main ]
pull_request:
jobs:
build-and-deploy-docs:
runs-on: ubuntu-latest
env:
docs-directory: /home/runner/work/kokkos-core-wiki/kokkos-core-wiki/docs
python-version: '3.10'
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ env.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ env.python-version }}
architecture: 'x64'
- name: Install Python dependencies
run: |
pip3 install -r build_requirements.txt
- name: Build documentation
working-directory: ${{ env.docs-directory }}
run: |
make html
- name: Archive documentation
uses: actions/upload-artifact@v4
with:
name: documentation.tar.gz
path: ${{ env.docs-directory }}/generated_docs
# .nojekyll file is needed for GitHub Pages to know it's getting a ready webpage
# and there is no need to generate anything
- name: Generate nojekyll file
working-directory: ${{ env.docs-directory }}/generated_docs
run: touch .nojekyll
# This action moves the content of `generated_docs` to the `deploy-doc-site` branch
- name: Deploy docs
if: ${{ github.ref == 'refs/heads/main' }}
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: deploy-doc-site
folder: ${{ env.docs-directory }}/generated_docs
clean: true