Deploy 113 by @csperkins #113
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: 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@v4 | |
- 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 | |
run: | | |
azcopy sync "${{ github.workspace }}/output" '${{ secrets.AZURE_SAS }}' --recursive=true --delete-destination=true --put-md5=true --compare-hash="MD5" | |
- 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 }' |