File tree Expand file tree Collapse file tree 1 file changed +41
-0
lines changed
example/.github/workflows Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Original file line number Diff line number Diff line change
1
+ # Uploads to fileset. Requirements:
2
+ # 1. Specify `env.SITE` and `env.GOOGLE_CLOUD_PROJECT`.
3
+ # 2. Add a secret `GCP_SA_KEY`.
4
+ name : ' Fileset upload'
5
+ on : [create, push]
6
+ jobs :
7
+ deploy :
8
+ runs-on : ubuntu-latest
9
+ env :
10
+ GOOGLE_CLOUD_PROJECT : ' '
11
+ SITE : ' '
12
+ steps :
13
+ - uses : actions/checkout@v2
14
+ with :
15
+ fetch-depth : 1
16
+ - name : Cache node modules
17
+ uses : actions/cache@v2
18
+ env :
19
+ cache-name : cache-node-modules
20
+ with :
21
+ path : |
22
+ ~/.npm
23
+ **/node_modules
24
+ key : ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
25
+ restore-keys : |
26
+ ${{ runner.os }}-build-${{ env.cache-name }}-
27
+ ${{ runner.os }}-build-
28
+ ${{ runner.os }}-
29
+ - name : Set up `gcloud` SDK
30
+ uses : google-github-actions/setup-gcloud@master
31
+ with :
32
+ project_id : ${{ env.GOOGLE_CLOUD_PROJECT }}
33
+ service_account_key : ${{ secrets.GCP_SA_KEY }}
34
+ export_default_credentials : true
35
+ - name : Build
36
+ run : |-
37
+ npm install
38
+ npm run build
39
+ - name : Upload
40
+ run : |-
41
+ npx @blinkk/fileset upload -s ${{ env.SITE }} -b ${GITHUB_REF#refs/heads/} build
You can’t perform that action at this time.
0 commit comments