Skip to content

Deploy 73 by @csperkins #73

Deploy 73 by @csperkins

Deploy 73 by @csperkins #73

Workflow file for this run

name: Deploy
run-name: Deploy ${{ github.run_number }} by @${{ github.actor }}
on:
workflow_dispatch:
jobs:
build:
name: Publish to Azure
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v3
- name: Azure Login
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 'ruby'
- name: Build website
env:
LANG: en_US.UTF-8
LC_ALL: C.UTF-8
run: |
bundle install
bundle exec nanoc
- name: Upload to blob storage
uses: azure/CLI@v1
with:
inlineScript: |
az storage blob sync --account-name ${{ secrets.AZURE_STORAGE_NAME }} -c '$web' -s output --delete-destination true
- name: Purge CF cache
run: |
curl --request POST \
--url ${{ secrets.CLOUDFLARE_PURGE_CACHE_URL}} \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer ${{ secrets.CLOUDFLARE_PURGE_CACHE_TOKEN }}' \
--data '{ "purge_everything": true }'
- name: Azure Logout
if: always()
run: |
az logout