Merge pull request #68 from intechstudio/feat/Configuration #7
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
# This file was auto-generated by the Firebase CLI | |
# https://github.com/firebase/firebase-tools | |
name: Deploy to Firebase Hosting on main commit | |
"on": | |
push: | |
branches: | |
- "prod" | |
- "main" | |
jobs: | |
build_and_deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Create public env file | |
run: | | |
echo $(git log -5) | |
touch .env | |
echo PUBLIC_COMMIT_HASH=$(git log --format="%h" -n 1) >> .env | |
echo PUBLIC_APP_ENV=development >> .env | |
echo PUBLIC_GOOGLE_CLIENT_ID=${{ secrets.PUBLIC_GOOGLE_CLIENT_ID_DEV }} >> .env | |
echo PUBLIC_CREATION_DATE=$(git log --format="%cd" --date=format:'%Y-%m-%d' -1) >> .env | |
- run: npm ci && npm run build | |
- uses: FirebaseExtended/action-hosting-deploy@v0 | |
with: | |
repoToken: "${{ secrets.GITHUB_TOKEN }}" | |
firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT_PROFILE_CLOUD_DEV }}" | |
channelId: live | |
projectId: profile-cloud-dev |