Skip to content

Commit

Permalink
Only skip existing files fro production runs
Browse files Browse the repository at this point in the history
  • Loading branch information
ggetz committed Oct 24, 2023
1 parent 487f632 commit 9034e5b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
run: npm run build-apps
- name: deploy to cesium.com
if: ${{ env.AWS_ACCESS_KEY_ID != '' }}
run: npm run deploy-s3 -- -b "cesium.com-next" -c 'public, max-age=1800' --confirm
run: npm run deploy-s3 -- -b "cesium.com-next" -c 'public, max-age=1800'--skip --confirm
- name: set status
if: ${{ env.AWS_ACCESS_KEY_ID != '' }}
run: npm run deploy-status -- --status success --message Deployed
7 changes: 6 additions & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -714,6 +714,11 @@ export async function deployS3() {
type: "boolean",
default: false,
},
skip: {
description: "Skip re-uploading exisiting files.",
type: "boolean",
default: false,
},
confirm: {
description: "Skip confirmation step, useful for CI.",
type: "boolean",
Expand All @@ -725,7 +730,7 @@ export async function deployS3() {
const bucketName = argv.bucket;
const dryRun = argv.dryRun;
const cacheControl = argv.cacheControl ? argv.cacheControl : "max-age=3600";
const skipFiles = process.env.BRANCH !== "main"; // Always re-upload the file on the main branch. This will ensure the file does not get deleted after a 30-day period
const skipFiles = argv.skip;

if (argv.confirm) {
return deployCesium(
Expand Down

0 comments on commit 9034e5b

Please sign in to comment.