revert #53
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: Blob storage assets CI | |
on: | |
push: | |
paths-ignore: | |
- '**.md' | |
branches: [ main ] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
# with: | |
# lfs: true | |
- name: login | |
uses: azure/login@v1 | |
with: | |
creds: ${{ secrets.AZURE_CREDENTIALS }} | |
- name: Upload to blob storage | |
uses: azure/CLI@v1 | |
with: | |
inlineScript: | | |
az storage blob upload-batch --account-name stpumptrack --auth-mode key -d 'spots' -s . --pattern *.json --content-type="application/json" --overwrite=true; | |
# az storage blob upload-batch --account-name stpumptrack --auth-mode key -d 'spots' -s . --pattern *.jpg --content-type="image/jpeg"; | |
# az storage blob upload-batch --account-name stpumptrack --auth-mode key -d 'spots' -s . --pattern *.mp4 --content-type="video/mp4"; | |
- name: Purge CDN endpoint | |
uses: azure/CLI@v1 | |
with: | |
inlineScript: | | |
az cdn endpoint purge --content-paths "/spots/*" --profile-name "cdn" --name "pumptrack" --resource-group "pumptrack-assets" | |
# Azure logout | |
- name: logout | |
run: | | |
az logout | |
if: always() | |
- name: Dispatch pumptrack-map worfklow | |
uses: actions/github-script@v6 | |
with: | |
github-token: ${{ secrets.PAT_TOKEN }} | |
script: | | |
await github.rest.actions.createWorkflowDispatch({ | |
owner: 'lluisd', | |
repo: 'pumptrack-map', | |
workflow_id: 'main_pumptrack-map-app.yml', | |
ref: 'main' | |
}) |