Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated Deployment #8

Merged
merged 1 commit into from
Sep 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading