Skip to content

Commit 86ad42a

Browse files
authored
Ci/moving upload html to another step (#40)
* Moving update github pages to another step * fix github_token thing * adding eol * Matching python versions in steps * Uploading nightly
1 parent 1b4083f commit 86ad42a

File tree

2 files changed

+83
-8
lines changed

2 files changed

+83
-8
lines changed

.github/workflows/ci-build.yml

Lines changed: 28 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,9 @@ on:
88
branches:
99
- main
1010

11-
1211
jobs:
1312
docs_build:
14-
runs-on: ubuntu-20.04
13+
runs-on: ubuntu-latest
1514

1615
steps:
1716
- uses: actions/checkout@v2
@@ -37,22 +36,43 @@ jobs:
3736
- name: Upload HTML Documentation
3837
uses: actions/[email protected]
3938
with:
40-
name: Documentation
39+
name: HTML-Documentation
4140
path: doc/build/html
4241
retention-days: 7
4342

4443
- name: Upload PDF Documentation
4544
uses: actions/[email protected]
4645
with:
47-
name: Documentation
46+
name: PDF-Documentation
4847
path: doc/build/latex/*.pdf
4948
retention-days: 7
5049

50+
Release:
51+
if: github.event_name == 'push' && contains(github.ref, 'refs/tags')
52+
needs: docs_build
53+
runs-on: ubuntu-latest
54+
steps:
55+
- name: Set up Python
56+
uses: actions/setup-python@v1
57+
with:
58+
python-version: 3.8
59+
60+
- uses: actions/download-artifact@v2
61+
62+
- name: Display structure of downloaded files
63+
run: ls -R
64+
5165
- name: Deploy to gh-pages
5266
uses: JamesIves/[email protected]
5367
with:
54-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
55-
BRANCH: gh-pages
56-
FOLDER: doc/build/html
57-
CLEAN: true
68+
token: ${{ secrets.github_token }}
69+
branch: gh-pages
70+
folder: doc/build/html
71+
clean: true
5872
single-commit: true
73+
74+
- name: Release
75+
uses: softprops/action-gh-release@v1
76+
with:
77+
files: |
78+
./**/*.pdf

.github/workflows/nightly-build.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Nightly Documentation Build
2+
3+
4+
on:
5+
schedule: # UTC at 0400
6+
- cron: '0 4 * * */2' # To run every 3 days
7+
workflow_dispatch:
8+
9+
jobs:
10+
nightly_docs_build:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v2
15+
16+
- name: Setup Python
17+
uses: actions/[email protected]
18+
with:
19+
python-version: 3.8
20+
21+
- name: Build HTML Documentation
22+
run: |
23+
pip install -r requirements_docs.txt --disable-pip-version-check
24+
make -C doc html SPHINXOPTS="-W"
25+
touch doc/build/html/.nojekyll
26+
echo "dev.docs.pyansys.com" > doc/build/html/CNAME
27+
28+
- name: Build PDF Documentation
29+
run: |
30+
sudo apt update
31+
sudo apt-get install -y texlive-latex-extra latexmk
32+
make -C doc latexpdf
33+
34+
- name: Upload HTML Documentation
35+
uses: actions/[email protected]
36+
with:
37+
name: HTML-Documentation
38+
path: doc/build/html
39+
retention-days: 7
40+
41+
- name: Upload PDF Documentation
42+
uses: actions/[email protected]
43+
with:
44+
name: PDF-Documentation
45+
path: doc/build/latex/*.pdf
46+
retention-days: 7
47+
48+
- name: Deploy to gh-pages
49+
uses: JamesIves/[email protected]
50+
with:
51+
token: ${{ secrets.github_token }}
52+
branch: gh-pages
53+
folder: doc/build/html
54+
clean: true
55+
single-commit: true

0 commit comments

Comments
 (0)