Skip to content

Commit d450460

Browse files
committed
ci(docs): Use PUBLISH condition
1 parent 1fbdf49 commit d450460

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

.github/workflows/docs.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,25 +34,26 @@ jobs:
3434
run: echo "PUBLISH=$(echo true)" >> $GITHUB_ENV
3535

3636
- name: Install poetry
37+
if: env.PUBLISH == 'true'
3738
run: pipx install "poetry==1.1.14"
3839

3940
- name: Set up Python ${{ matrix.python-version }}
41+
if: env.PUBLISH == 'true'
4042
uses: actions/setup-python@v4
4143
with:
4244
python-version: ${{ matrix.python-version }}
4345
cache: 'poetry'
4446

45-
- name: Add ~/.local/bin to PATH
46-
run: echo "$HOME/.local/bin" >> $GITHUB_PATH
47-
4847
- name: Install dependencies [w/ docs]
4948
run: poetry install --extras "docs lint"
5049

5150
- name: Build documentation
51+
if: env.PUBLISH == 'true'
5252
run: |
5353
pushd docs; make SPHINXBUILD='poetry run sphinx-build' html; popd
5454
5555
- name: Push documentation to S3
56+
if: env.PUBLISH == 'true'
5657
uses: jakejarvis/s3-sync-action@v0.5.1
5758
with:
5859
args: --acl public-read --follow-symlinks --delete
@@ -64,6 +65,7 @@ jobs:
6465
SOURCE_DIR: "docs/_build/html" # optional: defaults to entire repository
6566

6667
- name: Purge cache on Cloudflare
68+
if: env.PUBLISH == 'true'
6769
uses: jakejarvis/cloudflare-purge-action@v0.3.0
6870
env:
6971
CLOUDFLARE_TOKEN: ${{ secrets.CLOUDFLARE_TOKEN }}

0 commit comments

Comments
 (0)