Skip to content

Commit

Permalink
Merge pull request #8 from timothydodd/dodd/action3
Browse files Browse the repository at this point in the history
Updated Deployment
  • Loading branch information
timothydodd authored Sep 27, 2023
2 parents f656355 + 986a761 commit 0c7e0e0
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/build-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ jobs:
name: Deploy to Prod
runs-on: ubuntu-latest
needs: build
environment: prod
if: github.event_name != 'pull_request'
steps:
- name: Checkout
Expand All @@ -56,22 +55,22 @@ jobs:
with:
name: deploy_dist
- name: "Say Hello"
run: echo "Hello storage ${{env.STORAGE_ACCOUNT_NAME}}!"
run: echo "Hello storage ${{vars.STORAGE_ACCOUNT_NAME}}!"
- name: Delete blob storage
uses: azure/CLI@v1
with:
inlineScript: |
az storage blob delete-batch --source '$web' --account-name ${{env.STORAGE_ACCOUNT_NAME}} --auth-mode
az storage blob delete-batch --source '$web' --account-name ${{vars.STORAGE_ACCOUNT_NAME}} --auth-mode
- name: Upload to blob storage
uses: azure/CLI@v1
with:
inlineScript: |
az storage blob upload-batch --account-name ${{env.STORAGE_ACCOUNT_NAME}} --auth-mode key -d '$web' -s ./deploy_dist/$PROJECT_NAME --overwrite
az storage blob upload-batch --account-name ${{vars.STORAGE_ACCOUNT_NAME}} --auth-mode key -d '$web' -s ./deploy_dist/$PROJECT_NAME --overwrite
- name: Change index.html content-cache-control header
uses: azure/CLI@v1
with:
inlineScript: |
az storage blob update --account-name ${{env.STORAGE_ACCOUNT_NAME}} --auth-mode --container-name '$web' --name 'index.html' --content-cache-control 'no-cache'
az storage blob update --account-name ${{vars.STORAGE_ACCOUNT_NAME}} --auth-mode --container-name '$web' --name 'index.html' --content-cache-control 'no-cache'
- name: logout
run: |
az logout
Expand Down

0 comments on commit 0c7e0e0

Please sign in to comment.