Add hot reload capability to profile cloud web components #118
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 DEV on PR | |
on: | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
build_and_preview: | |
if: "${{ github.event.pull_request.head.repo.full_name == github.repository }}" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Create public env file | |
run: | | |
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 && npm run build:webcomponent | |
env: | |
WEB_COMPONENT_NAME: profile-cloud-pr | |
- uses: FirebaseExtended/action-hosting-deploy@v0 | |
with: | |
repoToken: "${{ secrets.GITHUB_TOKEN }}" | |
firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT_PROFILE_CLOUD_DEV }}" | |
projectId: profile-cloud-dev |