Explicity set action for preview action input (#1542)

GitHub actions have changed behaviour subtly in that
now setting the env is no longer sufficient for the
following action to pick up automatically.

Instead switch to being explicit.
This commit is contained in:
Darragh Bailey 2022-08-12 22:27:02 +01:00 committed by GitHub
parent 442ef24e64
commit 8717eb6935
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -49,9 +49,11 @@ jobs:
case $event_type in
"labeled")
echo "action set to deploy"
echo "action=deploy" >> "$GITHUB_ENV"
;;
"closed")
echo "action set to remove"
echo "action=remove" >> "$GITHUB_ENV"
;;
*)
@ -62,6 +64,7 @@ jobs:
- name: Deploy preview
uses: rossjrw/pr-preview-action@v1
with:
action: ${{ env.action }}
source-dir: ./build/
preview-branch: gh-pages
umbrella-dir: pr-preview