-
Notifications
You must be signed in to change notification settings - Fork 3
37 lines (35 loc) · 1.37 KB
/
deploy_dev.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
name: Deploy dev
on:
push:
branches:
- develop
jobs:
deploy:
environment: blueprints-dev
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
cache: "yarn"
- run: yarn
- run: yarn nx build blueprints
env:
CF_WEB_ANALYTICS: 6c563c1e5db141129a5fc95d5c459722
- name: Authenticate gcloud
uses: google-github-actions/auth@v1
with:
credentials_json: "${{ secrets.GCP_SA_KEY }}"
- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@v1
- run: gcloud auth configure-docker --quiet
- name: Build and push
uses: docker/build-push-action@v3
with:
context: .
file: blueprints.github.Dockerfile
push: true
tags: eu.gcr.io/factorio-sites/blueprints:dev
- run: gsutil -h "Cache-Control:public, max-age=31536000" -m rsync -r -d ./dist/apps/blueprints/.next/static gs://factorio-blueprints-assets/dev/_next/static
- run: gcloud run deploy factorio-blueprints-dev --image=eu.gcr.io/factorio-sites/blueprints:dev --platform managed --region=europe-west4 --remove-env-vars PUBLIC_URL --update-env-vars ASSET_PREFIX=https://factorio-blueprints-assets.storage.googleapis.com/dev,CF_WEB_ANALYTICS=6c563c1e5db141129a5fc95d5c459722