Skip to content

Backup Firestore

Backup Firestore #556

Workflow file for this run

name: Backup Firestore
on:
schedule:
- cron: '0 0 * * *'
env:
PROJECT_ID: visible-thoughts-writer
BUCKET: gs://visible-thoughts-writer-firestore-backup
jobs:
backup:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- id: 'auth'
uses: 'google-github-actions/auth@v1'
with:
credentials_json: '${{ secrets.GCP_SA_KEY }}'
- uses: google-github-actions/setup-gcloud@v1
- run: gcloud info
- run: gcloud config set project $PROJECT_ID
- run: gcloud firestore export $BUCKET