8000 Playwright Testing Actions fix (#23) · staticwebdev/vanilla-basic@c3544cc · GitHub
[go: up one dir, main page]

Skip to content

Commit c3544cc

Browse files
authored
Playwright Testing Actions fix (#23)
Making actions conditional on token presence
1 parent 81b00db commit c3544cc

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

.github/workflows/playwright-onDemand.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ on:
1616

1717
# Allows you to run this workflow manually from the Actions tab
1818
workflow_dispatch:
19+
20+
# Make env var reflect presence of token
21+
env:
22+
PAT_EXISTS: ${{ secrets.PAT_TOKEN }}
1923

2024
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
2125
jobs:
@@ -63,7 +67,7 @@ jobs:
6367
id: download
6468
- name: Publish to external repo
6569
# Only upload if we're running from the staticwebdev repo
66-
if: ${{ env.PAT_TOKEN != 0 }}
70+
if: "${{ env.PAT_EXISTS != '' }}"
6771
uses: peaceiris/actions-gh-pages@v3.7.3
6872
with:
6973
external_repository: mspnp/intern-js-pipeline
@@ -92,6 +96,7 @@ jobs:
9296
- name: Notify docusaurus repo
9397
env:
9498
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}
99+
if: "${{ env.PAT_EXISTS != '' }}"
95100
run: |
96101
gh api repos/mspnp/intern-js-pipeline/dispatches \
97102
--raw-field event_type=rebuild-site

0 commit comments

Comments
 (0)
0