CD Firebase Sunrise #30
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: CD Firebase Sunrise | |
on: | |
push: | |
branches: | |
- 'main' | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [20.x] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- uses: actions/cache@v2 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- run: npm i -g npm | |
- run: npm ci | |
- run: npm run build | |
- uses: google-github-actions/auth@v2.1.2 | |
with: | |
credentials_json: ${{ secrets.GCP_SERVICE_ACCOUNT }} | |
- name: Deploy to Firebase | |
run: npx firebase deploy --only hosting:sunrise-landing-page --project=default | |
env: | |
FIREBASE_CLI_EXPERIMENTS: webframeworks |