-
Notifications
You must be signed in to change notification settings - Fork 3
55 lines (53 loc) · 1.85 KB
/
deploy-extension-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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: ⭐️ Deploy PLATEAU Extension dev
on:
workflow_dispatch:
repository_dispatch:
types: [deploy-extension-dev]
env:
GCS_DEST: gs://plateau-dev-reearth-app-bucket
PLATEAU_ORIGIN: https://app.reearth.plateau.dev.reearth.io/extension
jobs:
deploy_extension:
runs-on: ubuntu-latest
if: github.event.repository.full_name == 'eukarya-inc/PLATEAU-VIEW-3.0'
environment: dev
permissions:
contents: read
id-token: write
packages: write
defaults:
run:
working-directory: extension
steps:
- uses: actions/checkout@v3
- uses: google-github-actions/auth@v2
with:
workload_identity_provider: ${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }}
service_account: ${{ secrets.GCP_SERVICE_ACCOUNT }}
- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@v2
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install
run: yarn install
- name: Build
env:
NODE_ENV: "development"
run: yarn build
- name: Deploy
run: gsutil -m -h "Cache-Control:no-store" rsync -x "^estat/.*$" -dr dist ${{ env.GCS_DEST }}/extension
- name: Pack extension
run: tar -zcvf plateauview-extension.tar.gz dist
- name: Save as artifact
uses: actions/upload-artifact@v4
with:
name: plateauview-extension
path: extension/plateauview-extension.tar.gz