Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

Merge pull request #35 from imyourmanzi/fix-auth-callback-handler #1

Merge pull request #35 from imyourmanzi/fix-auth-callback-handler

Merge pull request #35 from imyourmanzi/fix-auth-callback-handler #1

name: Production
concurrency: production
on:
push:
branches:
- main
paths-ignore:
- '.github/**'
- '!.github/workflows/main-2-deploy-application.yml'
- '.vscode/**'
- 'docs/**'
- 'infrastructure/**'
- 'tools/**'
- '.editorconfig'
- '.eslintrc.json'
- '.prettierignore'
- '.prettierrc'
- '*.md'
- 'jest*'
jobs:
# This job is based on one that was auto-generated by the Firebase CLI
# https://github.com/firebase/firebase-tools
ui:
name: Deploy UI
runs-on: ubuntu-latest
environment: production
concurrency: 'production:ui'
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
cache: npm
- run: npm ci
- run: npx nx build ui
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_IMYOURMANZI_SPOTIFYPLAYLISTMGR }}
channelId: live
projectId: imyourmanzi-spotifyplaylistmgr
server:
name: Deploy Server
runs-on: ubuntu-latest
environment: production
concurrency: 'production:server'
steps:
- uses: actions/checkout@v3
- id: gcp_auth
uses: google-github-actions/auth@v1
with:
credentials_json: '${{ secrets.SERVER_DEPLOY_KEY }}'
token_format: access_token
- uses: google-github-actions/setup-gcloud@v1
with:
project_id: imyourmanzi-spotifyplaylistmgr
# install_components: core,gcloud # see https://cloud.google.com/sdk/docs/components
- run: docker build --platform=linux/amd64 . -t us-central1-docker.pkg.dev/imyourmanzi-spotifyplaylistmgr/server-images/server:latest
- run: echo '${{ steps.gcp_auth.outputs.access_token }}' | docker login -u oauth2accesstoken --password-stdin https://us-central1-docker.pkg.dev
- run: docker push us-central1-docker.pkg.dev/imyourmanzi-spotifyplaylistmgr/server-images/server:latest
- run: gcloud run deploy server --image us-central1-docker.pkg.dev/imyourmanzi-spotifyplaylistmgr/server-images/server:latest --revision-suffix "$(date +'%Y%m%d-%H%M%S')" --region us-central1