-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from lowply/default-branch
Introduce TARGET_BRANCH env var
- Loading branch information
Showing
2 changed files
with
11 additions
and
6 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 |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
|
||
A GitHub Action to deploy to Firebase Hosting | ||
|
||
- This action only deploys the `master` branch | ||
- You can choose a specific branch to allow deployment by using the `TARGET_BRANCH` env var (`master` if not specified). | ||
- Make sure you have the `firebase.json` file in the repository | ||
- Get the Firebase token by running `firebase login:ci` and [store it](https://help.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets) as the `FIREBASE_TOKEN` secret | ||
- Set the project name in the `FIREBASE_PROJECT` env var | ||
|
@@ -14,7 +14,7 @@ name: Build and Deploy | |
on: | ||
push: | ||
branches: | ||
- master | ||
- main | ||
jobs: | ||
main: | ||
name: Build and Deploy | ||
|
@@ -25,8 +25,9 @@ jobs: | |
- name: Build Hugo | ||
uses: lowply/[email protected] | ||
- name: Deploy to Firebase | ||
uses: lowply/[email protected].2 | ||
uses: lowply/[email protected].3 | ||
env: | ||
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }} | ||
FIREBASE_PROJECT: name-of-the-project | ||
TARGET_BRANCH: main | ||
``` |
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