-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (45 loc) · 1.7 KB
/
deploy-quasar.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Deploy Quasar App to Google Cloud Run
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '20'
- name: Authenticate to Google Cloud
uses: google-github-actions/auth@v2
with:
credentials_json: ${{ secrets.GCP_SA_KEY }}
- name: Set up Google Cloud SDK
uses: google-github-actions/setup-gcloud@v1
with:
project_id: ${{ secrets.GCP_PROJECT_ID }}
- name: Create .env file
run: |
echo "VUE_APP_TICKET_API_BASE_URL=${{ secrets.TICKET_API_BASE_URL }}" >> ./ticket-smasher/.env
echo "VUE_APP_FIREBASE_API_KEY=${{ secrets.FIREBASE_AUTH_KEY }}" >> ./ticket-smasher/.env
echo "VUE_APP_FIREBASE_AUTH_DOMAIN=${{ secrets.FIREBASE_AUTH_DOMAIN }}" >> ./ticket-smasher/.env
- name: Configure Docker to use gcloud as a credential helper
run: |
gcloud auth configure-docker
- name: Build Docker image
run: |
docker build -t gcr.io/${{ secrets.GCP_PROJECT_ID }}/quasar-app:latest -f ./ticket-smasher/Dockerfile ./ticket-smasher
- name: Push Docker image to Google Container Registry
run: |
docker push gcr.io/${{ secrets.GCP_PROJECT_ID }}/quasar-app:latest
- name: Deploy to Google Cloud Run
run: |
gcloud run deploy quasar-app \
--image gcr.io/${{ secrets.GCP_PROJECT_ID }}/quasar-app:latest \
--platform managed \
--region europe-west1 \
--allow-unauthenticated