Skip to content

Commit

Permalink
fix/errors in github action.
Browse files Browse the repository at this point in the history
increase checkout depth with tags and fix error with version file not being copied.
  • Loading branch information
pattersonbl2 committed Apr 4, 2024
1 parent 6d91103 commit 8f4d215
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/gcp_deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 1
fetch-tags: true

- name: Setup Node js
uses: actions/setup-node@v3

Expand All @@ -54,6 +58,6 @@ jobs:
bash ./.utils/build-version-json.sh
fi
- name: Deploying unpublsiehd content to stage.
- name: Deploy the website to stage
run: |
sh ./.utils/gcs-deploy.sh ${{ vars.EXTENSIONWORKSHOP_BUCKET_STAGE }}
5 changes: 4 additions & 1 deletion .github/workflows/gcp_deploy_prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 1
fetch-tags: true

- name: Setup Node js
uses: actions/setup-node@v3
Expand Down Expand Up @@ -56,6 +59,6 @@ jobs:
bash ./.utils/build-version-json.sh
fi
- name: Deploying unpublsiehd content to stage.
- name: Deploy website to prod
run: |
sh ./.utils/gcs-deploy.sh ${{ vars.EXTENSIONWORKSHOP_BUCKET_PROD }}
1 change: 1 addition & 0 deletions .utils/gcs-deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

if [ -e version.json ]; then
mv version.json dist/__version__
gsutil cp dist/__version__ "gs://${EXTENSION_WORKSHOP_BUCKET_GCS}/__version__"
# __version__ JSON; short cache
gsutil \
-h "cache-control: max-age=${TEN_MINS}" \
Expand Down

0 comments on commit 8f4d215

Please sign in to comment.