Skip to content

Removed repetitive words #52

Removed repetitive words

Removed repetitive words #52

# 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
jobs:
build_and_deploy:
runs-on: ubuntu-latest
environment: prod
steps:
- uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'yarn'
cache-dependency-path: ./web/yarn.lock
- run: |
pushd web
echo "${{ secrets.ENV_FILE }}" > .env
yarn install --immutable --immutable-cache
yarn generate
popd
# - uses: FirebaseExtended/action-hosting-deploy@v0
# with:
# repoToken: '${{ secrets.GITHUB_TOKEN }}'
# firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_CODEREV_APP }}'
# channelId: live
# projectId: coderev-app
- name: Build Functions
working-directory: functions
run: |
npm ci --prefer-offline --no-audit --no-progress
npm run build
if [ $? != 0 ]; then
echo "Build failed"
exit 1
fi
- name: Deploy Hosting and Firebase Rules
uses: w9jds/[email protected]
with:
args: deploy --only firestore,hosting,functions,storage
env:
GCP_SA_KEY: ${{ secrets.GCP_CREDENTIALS_JSON }}