Add note from iOS Shortcut #240
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: Build and deploy website | |
on: | |
push: | |
paths: | |
- "src/**/*" | |
- "_config.ts" | |
- "CNAME" | |
- "deps.ts" | |
- "README.md" # Just to be able to trigger rebuilds from dummy commits | |
- ".rebuild" # same ^^ | |
- ".github/workflows/deploy.yml" | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
persist-credentials: false | |
- name: Setup deno and lume | |
uses: denoland/setup-deno@v1 | |
with: | |
deno-version: v1.30.x | |
- name: Install and build site | |
env: | |
CI: true | |
NODE_ENV: production | |
ENV: production | |
run: deno task build --quiet | |
- name: Deploy to GitHub Pages | |
if: github.ref_name == 'main' | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
# The branch the action should deploy to. | |
branch: gh-pages | |
# The folder the action should deploy. | |
folder: build | |
- name: Purge Cloudflare cache | |
if: github.ref_name == 'main' | |
uses: jakejarvis/cloudflare-purge-action@master | |
env: | |
CLOUDFLARE_ZONE: ${{ secrets.CLOUDFLARE_ZONE }} | |
CLOUDFLARE_TOKEN: ${{ secrets.CLOUDFLARE_TOKEN }} |