From 33832c3fe03a876c76c231cc74f409d24e9bf760 Mon Sep 17 00:00:00 2001 From: Devon Shigaki <93375490+devonshigaki@users.noreply.github.com> Date: Mon, 9 Sep 2024 12:51:03 -0700 Subject: [PATCH 1/2] Create firebase-functions.yml --- .github/workflows/firebase-functions.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/firebase-functions.yml diff --git a/.github/workflows/firebase-functions.yml b/.github/workflows/firebase-functions.yml new file mode 100644 index 0000000..b266906 --- /dev/null +++ b/.github/workflows/firebase-functions.yml @@ -0,0 +1,19 @@ +name: Firebase Functions CI/CD +on: + push: + branches: + - main +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + - name: Install Firebase Tools + run: npm install -g firebase-tools + - name: Authenticate with Firebase + run: firebase login:ci --no-localhost --token ${{ secrets.FIREBASE_TOKEN }} + - name: Install Dependencies + run: npm install + - name: Deploy Firebase Functions + run: firebase deploy --only functions From 44477ba1769c40d0e7108d6e9328f2a656159ea4 Mon Sep 17 00:00:00 2001 From: Devon Shigaki <93375490+devonshigaki@users.noreply.github.com> Date: Mon, 9 Sep 2024 12:58:14 -0700 Subject: [PATCH 2/2] Update firebase-functions.yml --- .github/workflows/firebase-functions.yml | 26 +++++++++++++++--------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/.github/workflows/firebase-functions.yml b/.github/workflows/firebase-functions.yml index b266906..7047c64 100644 --- a/.github/workflows/firebase-functions.yml +++ b/.github/workflows/firebase-functions.yml @@ -1,19 +1,25 @@ name: Firebase Functions CI/CD + on: push: branches: - main + jobs: deploy: runs-on: ubuntu-latest + steps: - - name: Checkout Repository - uses: actions/checkout@v4 - - name: Install Firebase Tools - run: npm install -g firebase-tools - - name: Authenticate with Firebase - run: firebase login:ci --no-localhost --token ${{ secrets.FIREBASE_TOKEN }} - - name: Install Dependencies - run: npm install - - name: Deploy Firebase Functions - run: firebase deploy --only functions + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Install Firebase Tools + run: npm install -g firebase-tools + + - name: Install Dependencies + run: npm install + + - name: Deploy Firebase Functions + env: + FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }} + run: firebase deploy --only functions --token "$FIREBASE_TOKEN"