Archive games after 24h in GCS and restore automatically #237
Workflow file for this run
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: CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
format: | |
name: Format | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "20" | |
- run: npm ci | |
- run: npx prettier --check . | |
lint_test: | |
name: Lint and Test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "20" | |
- run: npm ci | |
- run: npm run lint | |
- run: npm test | |
functions: | |
name: Cloud Functions | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "20" | |
- run: npm ci | |
working-directory: functions | |
- run: npm run build | |
working-directory: functions | |
preview: | |
name: Deploy Preview | |
runs-on: ubuntu-latest | |
needs: [format, lint_test, functions] | |
if: | |
success() && github.event_name == 'push' && github.repository_owner == | |
'ekzhang' | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "20" | |
- run: npm ci | |
- run: npm ci | |
working-directory: functions | |
- run: npm run build:preview | |
- name: Deploy to Firebase | |
uses: w9jds/firebase-action@master | |
with: | |
args: deploy -P staging --only database,functions,hosting,storage | |
env: | |
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }} |