File tree 1 file changed +14
-3
lines changed
1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -53,11 +53,22 @@ jobs:
53
53
54
54
- name : Create Tarball
55
55
run : |
56
- tar --exclude="./.git" --exclude="./node_modules" --ignore-failed-read -czf "$TARBALL_NAME" ./
56
+ # Create a temporary directory
57
+ TEMP_DIR=$(mktemp -d)
58
+
59
+ # Copy everything except .git and node_modules to the temp directory
60
+ rsync -a --exclude=".git" --exclude="node_modules" ./ "$TEMP_DIR/"
61
+
62
+ # Navigate to the temp directory and create the tarball
63
+ cd "$TEMP_DIR"
64
+ tar --ignore-failed-read -czf "$GITHUB_WORKSPACE/$TARBALL_NAME" ./
65
+
66
+ # Clean up the temporary directory
67
+ rm -rf "$TEMP_DIR"
57
68
58
69
- name : Upload Tarball to S3
59
70
run : |
60
- aws s3 cp "$TARBALL_NAME" "s3://$AWS_S3_BUCKET/create-hyperweb-app/$TARBALL_NAME" --acl public-read
71
+ aws s3 cp "$GITHUB_WORKSPACE/$ TARBALL_NAME" "s3://$AWS_S3_BUCKET/create-hyperweb-app/$TARBALL_NAME" --acl public-read
61
72
echo "Tarball uploaded: https://$AWS_S3_BUCKET.s3.amazonaws.com/create-hyperweb-app/$TARBALL_NAME"
62
73
env :
63
74
AWS_DEFAULT_REGION : ' us-east-1'
68
79
- name : Update latest.tar.gz (Only on Main)
69
80
if : github.ref == 'refs/heads/main'
70
81
run : |
71
- aws s3 cp "$TARBALL_NAME" "s3://$AWS_S3_BUCKET/create-hyperweb-app/latest.tar.gz" --acl public-read
82
+ aws s3 cp "$GITHUB_WORKSPACE/$ TARBALL_NAME" "s3://$AWS_S3_BUCKET/create-hyperweb-app/latest.tar.gz" --acl public-read
72
83
echo "Latest tarball updated: https://$AWS_S3_BUCKET.s3.amazonaws.com/create-hyperweb-app/latest.tar.gz"
73
84
env :
74
85
AWS_DEFAULT_REGION : ' us-east-1'
You can’t perform that action at this time.
0 commit comments