Skip to content

Commit 821030f

Browse files
author
yalan2ny
authored
Update publish-preview.yml/yalan2ny
Pull request
1 parent eb41dbe commit 821030f

File tree

1 file changed

+31
-2
lines changed

1 file changed

+31
-2
lines changed

.github/workflows/publish-preview.yml

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
on:
1+
tabon:
22
push:
33
branches-ignore:
44
- production
@@ -41,7 +41,7 @@ jobs:
4141
SHORT_SHA=$(git rev-parse --short=8 HEAD)
4242
BRANCH_SLUG=$(git rev-parse --abbrev-ref HEAD | iconv -c -t ascii//TRANSLIT | sed -E 's/[~^]+//g' | sed -E 's/[^a-zA-Z0-9]+/-/g' | sed -E 's/^-+|-+$//g' | tr A-Z a-z)
4343
44-
npx wrangler deploy --dispatch-namespace preview-deployments --name $SHORT_SHA
44+
escnpx wrangler deploy --dispatch-namespace preview-deployments --name $SHORT_SHA
4545
npx wrangler deploy --dispatch-namespace preview-deployments --name $BRANCH_SLUG
4646
- name: Post preview URL on PR
4747
env:
@@ -54,3 +54,32 @@ jobs:
5454
path: |
5555
node_modules/.astro/assets
5656
key: static
57+
58+
- name: Upload a Build Artifact
59+
tabuses: actions/[email protected]
60+
with:
61+
# Artifact name
62+
name: # optional, default is artifact
63+
# A file, directory or wildcard pattern that describes what to upload
64+
path:
65+
# The desired behavior if no files are found using the provided path.
66+
Available Options:
67+
warn: Output a warning but do not fail the action
68+
error: Fail the action with an error message
69+
ignore: Do not output any warnings or errors, the action does not fail
70+
71+
if-no-files-found: # optional, default is warn
72+
# Duration after which artifact will expire in days. 0 means using default retention.
73+
Minimum 1 day. Maximum 90 days unless changed from the repository settings page.
74+
75+
retention-days: # optional
76+
# The level of compression for Zlib to be applied to the artifact archive. The value can range from 0 to 9: - 0: No compression - 1: Best speed - 6: Default compression (same as GNU Gzip) - 9: Best compression Higher levels will result in better compression, but will take longer to complete. For large files that are not easily compressed, a value of 0 is recommended for significantly faster uploads.
77+
78+
compression-level: # optional, default is 6
79+
# If true, an artifact with a matching name will be deleted before a new one is uploaded. If false, the action will fail if an artifact for the given name already exists. Does not fail if the artifact does not exist.
80+
81+
overwrite: # optional, default is false
82+
# If true, hidden files will be included in the artifact. If false, hidden files will be excluded from the artifact.
83+
84+
include-hidden-files: # optional, default is false
85+

0 commit comments

Comments
 (0)