Merge pull request #779 from eisbuk/fix/auth-redirects #350
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: Deploy to production | |
"on": | |
push: | |
branches: | |
- master | |
jobs: | |
deploy: | |
environment: Production | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- name: Install expect | |
run: sudo apt-get -y install expect | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
fetch-depth: 1 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: "18" | |
- name: Cache node modules and firebase emulators | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.rush | |
~/.pnpm-store | |
common/temp | |
**/node_modules | |
~/.cache/firebase/emulators | |
key: ${{ runner.os }}-modules-emulators-node18-v1-${{ hashFiles('**/pnpm-lock.yaml') }} | |
- name: Add rush directory to PATH | |
run: echo PATH=$PWD/common/scripts/:$PATH >> $GITHUB_ENV | |
- name: Install and build packages | |
run: rush update | |
- name: Build packages | |
run: rush build | |
- name: Build app | |
run: cd packages/client && rushx build:prod | |
env: | |
REACT_APP_FIREBASE_API_KEY: ${{ secrets.FIREBASE_API_KEY }} | |
REACT_APP_FIREBASE_APP_ID: ${{ secrets.FIREBASE_APP_ID }} | |
REACT_APP_DATABASE_URL: ${{ secrets.DATABASE_URL }} | |
REACT_APP_FIREBASE_MESSAGING_SENDER_ID: ${{ secrets.FIREBASE_MESSAGING_SENDER_ID }} | |
REACT_APP_FIREBASE_AUTH_DOMAIN: ${{ secrets.FIREBASE_AUTH_DOMAIN }} | |
REACT_APP_FIREBASE_STORAGE_BUCKET: ${{ secrets.FIREBASE_STORAGE_BUCKET }} | |
REACT_APP_FIREBASE_MEASUREMENT_ID: ${{ secrets.FIREBASE_MEASUREMENT_ID }} | |
REACT_APP_SENTRY_DSN: ${{ secrets.SENTRY_IGORICE_DSN }} | |
REACT_APP_SENTRY_ENVIRONMENT: production | |
REACT_APP_SENTRY_RELEASE: ${{ github.sha }} | |
- name: Deploy to firebase | |
run: rush deploy:production | |
env: | |
FIREBASE_TOKEN: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_EISBUK }} | |
- name: Create Sentry release | |
uses: getsentry/action-release@v1 | |
env: | |
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | |
SENTRY_ORG: eisbuk | |
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }} | |
SENTRY_URL: ${{ secrets.SENTRY_URL }} | |
with: | |
environment: production | |
sourcemaps: ./packages/client/dist/assets |