File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -23,16 +23,16 @@ inputs:
2323 required : false
2424 default : ' '
2525
26- pre-build-command :
27- description : ' Command to run after installing deps but before the docs build'
28- required : false
29- default : ' '
30-
3126 install-slim :
3227 description : ' Whether to install SLiM'
3328 required : false
3429 default : ' false'
3530
31+ install-playwright :
32+ description : ' Install Playwright (chromium) for docs that render browser screenshots'
33+ required : false
34+ default : ' false'
35+
3636runs :
3737 using : composite
3838 steps :
@@ -89,12 +89,12 @@ runs:
8989 echo "PKG_VERSION=$PKG_VERSION"
9090 sed -i s/__PKG_VERSION__/${PKG_VERSION}/g docs/_config.yml
9191
92- - name : Pre-build
93- if : inputs.pre-build-command != ''
92+ - name : Install Playwright
93+ if : ${{ inputs.install-playwright == 'true' }}
9494 shell : bash
9595 env :
96- PRE_BUILD_COMMAND : ${{ inputs.pre-build-command }}
97- run : ${PRE_BUILD_COMMAND}
96+ PYPROJECT_DIRECTORY : ${{ inputs.pyproject-directory }}
97+ run : uv run --no-default-groups --project=${PYPROJECT_DIRECTORY} --locked --group=docs playwright install --with-deps chromium
9898
9999 - name : Build documentation
100100 shell : bash
Original file line number Diff line number Diff line change 2323 type : string
2424 default : ' '
2525
26- pre-build-command :
27- description : ' Command to run after installing deps but before the docs build'
28- required : false
29- type : string
30- default : ' '
31-
3226 install-slim :
3327 description : ' Whether to install SLiM'
3428 required : false
3529 type : boolean
3630 default : false
3731
32+ install-playwright :
33+ description : ' Install Playwright (chromium) for docs that render browser screenshots'
34+ required : false
35+ type : boolean
36+ default : false
37+
3838permissions :
3939 contents : read
4040
5757 with :
5858 pyproject-directory : ${{ inputs.pyproject-directory }}
5959 additional-apt-packages : ${{ inputs.additional-apt-packages }}
60- pre-build-command : ${{ inputs.pre-build-command }}
6160 install-slim : ${{ inputs.install-slim }}
61+ install-playwright : ${{ inputs.install-playwright }}
6262
6363 - name : Trigger tskit-site rebuild
6464 if : github.ref == 'refs/heads/main'
You can’t perform that action at this time.
0 commit comments