[BUGFIX] Overwrite assets on azure #35
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Workflow | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Use Node.js 18 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18.x' | |
- name: Install | |
run: | | |
npm install | |
- name: Build | |
run: | | |
npm run build | |
- name: Archive production artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: dist | |
path: dist | |
deploy: | |
runs-on: ubuntu-latest | |
needs: [build] | |
steps: | |
- name: Download production artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: dist | |
path: universe/dist | |
- name: Upload to Azure | |
env: | |
AZURE_STORAGE_ACCOUNT: ${{ secrets.AZURE_ACCOUNT }} | |
AZURE_STORAGE_KEY: ${{ secrets.AZURE_KEY }} | |
run: | | |
az storage blob upload-batch --source . --destination ${{ secrets.AZURE_CONTAINER }} --content-cache-control "public, max-age=86400" --overwrite | |