Updating firebase json #3
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: Firebase deploy | |
on: | |
push: | |
branches: | |
- main | |
permissions: | |
actions: read | |
contents: read | |
jobs: | |
deoploy: | |
name: Deploy | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: "npm" | |
- run: npm ci --legacy-peer-deps | |
- uses: nrwl/nx-set-shas@v4 | |
- run: npm run lint:all:fix | |
- name: Check for Lint Fixes | |
run: | | |
if [[ $(git status --porcelain) ]]; then | |
echo "Error: Linting caused changes in files. Please commit these changes." | |
git status --short # Show which files were changed | |
exit 1 # Exit with error code | |
else | |
echo "Linting completed with no changes." | |
fi | |
- run: npm run build:functions | |
# App Hosting is deployed with Google Cloud Build | |
- name: Deploy everything except for hosting | |
uses: w9jds/firebase-action@master | |
with: | |
args: deploy --except hosting | |
env: | |
GCP_SA_KEY: ${{ secrets.FIREBASE_DEPLOY_SA }} |