13
13
- testing
14
14
15
15
env :
16
- NIKOLA_OUTPUT_DIR : output
17
- WEBSITE_CLONE_DIR : website
16
+ SPHINX_OUTPUT_DIR : build/html
18
17
RSYNC_USER : " ctdeploy"
19
18
RSYNC_SERVER : " cantera.org"
20
19
DEPLOY : ${{ github.event_name == 'push' && github.repository_owner == 'Cantera' && (endswith(github.ref, 'main') || endsWith(github.ref, 'testing')) }}
21
20
22
21
jobs :
23
22
build :
24
- runs-on : ubuntu-20 .04
23
+ runs-on : ubuntu-24 .04
25
24
steps :
26
- - uses : actions/checkout@v2
25
+ - uses : actions/checkout@v4
27
26
name : Checkout the repository
28
27
with :
29
28
submodules : recursive
30
- path : ${{ env.WEBSITE_CLONE_DIR }}
31
- - uses : actions/checkout@v2
32
- name : Checkout Cantera repository
33
- with :
34
- submodules : recursive
35
- repository : Cantera/cantera
36
- path : cantera
37
- ref : 2.6
38
- - uses : actions/checkout@v2
39
- name : Checkout Cantera 'main' repository
40
- with :
41
- submodules : recursive
42
- repository : Cantera/cantera
43
- path : cantera-dev
44
- - uses : actions/checkout@v2
45
- name : Checkout Cantera Jupyter repository
46
- with :
47
- repository : Cantera/cantera-jupyter
48
- path : cantera-jupyter
49
29
- name : Setup Python
50
- uses : actions/setup-python@v2
30
+ uses : actions/setup-python@v5
51
31
with :
52
- python-version : 3.9
53
- architecture : x64
54
- - name : Upgrade pip
55
- run : python3 -m pip install -U pip setuptools wheel
56
- - name : Get pip cache dir
57
- id : pip-cache
58
- run : echo "::set-output name=dir::$(python3 -m pip cache dir)"
59
-
60
- - name : Cache dependencies
61
- uses : actions/cache@v2
62
- with :
63
- path : ${{ steps.pip-cache.outputs.dir }}
64
- key : ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
65
- restore-keys : ${{ runner.os }}-pip-
66
-
67
- - name : Install dependencies
68
- run : python3 -m pip install -r requirements.txt
69
- working-directory : ${{ env.WEBSITE_CLONE_DIR }}
70
-
71
- # Parse SCons configuration for development version and move reST file
72
- - name : Parse configuration options from Cantera SConstruct as reST
32
+ python-version : 3.13
33
+ - name : Install pdm
73
34
run : |
74
- cd cantera-dev
75
- python3 `which scons` help --restructured-text --dev --output=scons-config-options-dev.rst
76
- cd ..
77
- mv -f cantera-dev/scons-config-options-dev.rst ${{ env.WEBSITE_CLONE_DIR }}/pages/compiling/
78
-
35
+ python3 -m pip install pdm
36
+ pdm install
79
37
- name : Build the site
80
- run : NIKOLA_DEBUG=1 nikola build
81
- working-directory : ${{ env.WEBSITE_CLONE_DIR }}
38
+ run : pdm run build
82
39
83
40
# Create artifact containing output
84
41
- name : Create archive for website output
85
42
run : |
86
- cd ${{ env.WEBSITE_CLONE_DIR }}; \
87
- tar -czf website.tar.gz ${{ env.NIKOLA_OUTPUT_DIR }}
43
+ tar -czf website.tar.gz ${{ env.SPHINX_OUTPUT_DIR }}
88
44
- name : Store archive of website output
89
- uses : actions/upload-artifact@v2
45
+ uses : actions/upload-artifact@v4
90
46
with :
91
- path : ${{ env.WEBSITE_CLONE_DIR }}/ website.tar.gz
92
- retention-days : 5
47
+ path : website.tar.gz
48
+ retention-days : 14
93
49
94
50
# The known_hosts key is generated with `ssh-keygen -F cantera.org` from a
95
51
# machine that has previously logged in to cantera.org and trusts
@@ -106,13 +62,15 @@ jobs:
106
62
RSYNC_DEST : " cantera"
107
63
run : |
108
64
rsync -avzP --checksum --exclude='*.map' --exclude='*.md5' \
109
- --delete --delete-excluded --filter='P /mw_headers.git' --filter='P /documentation/dev/*' \
110
- "${WEBSITE_CLONE_DIR}/${NIKOLA_OUTPUT_DIR}/" ${RSYNC_USER}@${RSYNC_SERVER}:${RSYNC_DEST}
65
+ --delete --delete-excluded --filter='P /mw_headers.git' --filter='P /dev' \
66
+ --filter='P /?.?' --filter='P /stable'
67
+ "${SPHINX_OUTPUT_DIR}/" ${RSYNC_USER}@${RSYNC_SERVER}:${RSYNC_DEST}
111
68
- name : Upload the docs
112
69
if : env.DEPLOY == 'true' && endsWith(github.ref, 'testing')
113
70
env :
114
71
RSYNC_DEST : " testing.cantera.org"
115
72
run : |
116
73
rsync -avzP --checksum --exclude='*.map' --exclude='*.md5' \
117
- --delete --delete-excluded --filter='P /mw_headers.git' --filter='P /documentation/dev/*' \
118
- "${WEBSITE_CLONE_DIR}/${NIKOLA_OUTPUT_DIR}/" ${RSYNC_USER}@${RSYNC_SERVER}:${RSYNC_DEST}
74
+ --delete --delete-excluded --filter='P /mw_headers.git' --filter='P /dev' \
75
+ --filter='P /?.?' --filter='P /stable'
76
+ "${SPHINX_OUTPUT_DIR}/" ${RSYNC_USER}@${RSYNC_SERVER}:${RSYNC_DEST}
0 commit comments