Skip to content

deploy

deploy #822

Workflow file for this run

name: deploy
on:
workflow_run:
workflows: [ci]
types: [completed]
branches: [master]
workflow_dispatch: {}
concurrency:
group: deploy
cancel-in-progress: true
jobs:
deploy:
if: ${{ github.event.workflow_run.conclusion == 'success' && github.event_name != 'pull_request' }}
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # full history to get the last tagged git commit
- uses: actions/cache@v4
with:
path: .firebase
key: firebase-${{ github.run_id }}
restore-keys: |
firebase-
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- run: bun install --frozen-lockfile
- run: bun run build
- name: Deploy to firebase
run: |
curl -Lo ./firebase_bin https://firebase.tools/bin/linux/latest
chmod +x ./firebase_bin
./firebase_bin deploy --only hosting
env:
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
# - name: Purge CDN
# run: |
# curl -X POST "https://api.cloudflare.com/client/v4/zones/${{ secrets.CLOUDFLARE_ZONE }}/purge_cache" \
# -H "Authorization: Bearer ${{ secrets.CLOUDFLARE_AUTH }}" \
# -H "Content-Type: application/json" \
# --data '{"purge_everything":true}'