chore: modify dev deployment for stable master branch #22
Workflow file for this run
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: App Deploy | |
on: | |
push: | |
branches: | |
# - master | |
workflow_dispatch: | |
env: | |
RUN_REGION: europe-west1 | |
SERVICE_NAME: studyu-app | |
jobs: | |
setup-build-deploy: | |
name: Setup, Build, and Deploy | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
# Setup gcloud CLI | |
- uses: google-github-actions/setup-gcloud@v0 | |
with: | |
version: 'latest' | |
service_account_key: ${{ secrets.RUN_SA_KEY }} | |
project_id: ${{ secrets.RUN_PROJECT }} | |
- name: Configure Docker | |
run: | | |
gcloud auth configure-docker | |
- name: Build | |
run: | | |
docker build -t gcr.io/${{ secrets.RUN_PROJECT }}/$SERVICE_NAME:latest --build-arg FLUTTER_APP_FOLDER=app . | |
- name: Push | |
run: | | |
docker push gcr.io/${{ secrets.RUN_PROJECT }}/$SERVICE_NAME:latest | |
- name: Deploy | |
run: | | |
gcloud run deploy "$SERVICE_NAME" \ | |
--region "$RUN_REGION" \ | |
--image gcr.io/${{ secrets.RUN_PROJECT }}/$SERVICE_NAME \ | |
--platform managed \ | |
--allow-unauthenticated \ | |
--project ${{ secrets.RUN_PROJECT }} |