Skip to content

Commit

Permalink
💎 cd 👷 cd 🌐
Browse files Browse the repository at this point in the history
  • Loading branch information
devfemibadmus committed Jul 29, 2024
1 parent 170e64f commit f1704c8
Showing 1 changed file with 11 additions and 22 deletions.
33 changes: 11 additions & 22 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,19 @@
name: Deploy to Firebase Hosting
# This file was auto-generated by the Firebase CLI
# https://github.com/firebase/firebase-tools

name: Deploy to Firebase Hosting on merge
on:
push:
branches:
- main

- master
jobs:
build_and_deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '20'

- name: Install Firebase CLI
run: npm install -g firebase-tools

- name: Deploy to Firebase Hosting
env:
FIREBASE_SERVICE_ACCOUNT_KEY: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_KEY }}
run: |
echo $FIREBASE_SERVICE_ACCOUNT_KEY > ${GITHUB_WORKSPACE}/firebase-key.json
firebase use --add --project $(jq -r '.project_id' firebase-key.json)
firebase deploy --only hosting --token "$(firebase auth:import-service-account-credentials firebase-key.json)"
- uses: actions/checkout@v4
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: ${{ secrets.GITHUB_TOKEN }}
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_TODOLIST_2024 }}
channelId: live
projectId: todolist-2024

0 comments on commit f1704c8

Please sign in to comment.