-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
170e64f
commit f1704c8
Showing
1 changed file
with
11 additions
and
22 deletions.
There are no files selected for viewing
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
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 |