Skip to content

Commit

Permalink
Remove Azure deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
Porges authored Jun 14, 2024
1 parent 1fe1296 commit 2553b66
Showing 1 changed file with 0 additions and 58 deletions.
58 changes: 0 additions & 58 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,61 +41,3 @@ jobs:
api_token: ${{ secrets.NEOCITIES_API_TOKEN }}
cleanup: false
dist_dir: public

- uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}

- uses: kheiakiyama/install-azcopy-action@20e5ba89939ac40f6d304a06938e288c151814ce
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}

- name: Upload to blob storage
run: azcopy sync public 'https://waystoplay.blob.core.windows.net/$web' --delete-destination=true --compare-hash=MD5 --put-md5=true

- name: Set cache-control on fonts/images
run: |
noHeaderFilter='.[] | select(.properties.contentSettings.cacheControl == null) | .name'
export AZURE_STORAGE_AUTH_MODE=login
export AZURE_STORAGE_ACCOUNT=waystoplay
echo CSS - 1 week
blobs=$(az storage blob list --container-name '$web' --prefix css/ | jq -r "$noHeaderFilter")
for blob in $blobs; do
az storage blob update --container-name '$web' --name "$blob" --content-cache 'max-age=604800'
done
echo fonts - 6 months
blobs=$(az storage blob list --container-name '$web' --prefix fonts/ | jq -r "$noHeaderFilter")
for blob in $blobs; do
az storage blob update --container-name '$web' --name "$blob" --content-cache 'max-age=15768000'
done
echo images - 6 months
blobs=$(az storage blob list --container-name '$web' --prefix img/ | jq -r "$noHeaderFilter")
for blob in $blobs; do
az storage blob update --container-name '$web' --name "$blob" --content-cache 'max-age=15768000'
done
echo small-images - 6 months
blobs=$(az storage blob list --container-name '$web' --prefix small-images/ | jq -r "$noHeaderFilter")
for blob in $blobs; do
az storage blob update --container-name '$web' --name "$blob" --content-cache 'max-age=15768000'
done
echo audio - 6 months
blobs=$(az storage blob list --container-name '$web' --prefix audio/ | jq -r "$noHeaderFilter")
for blob in $blobs; do
az storage blob update --container-name '$web' --name "$blob" --content-cache 'max-age=15768000'
done
- name: Purge CDN
uses: azure/CLI@v1
with:
inlineScript: |
az cdn endpoint purge -g ways-to-play --profile-name ways-to-play-cdn -n waystoplay --content-paths '/*' --no-wait
- name: logout
run: az logout
if: always()

0 comments on commit 2553b66

Please sign in to comment.