-
-
Notifications
You must be signed in to change notification settings - Fork 553
42 lines (36 loc) · 1.23 KB
/
nightly.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
# GitHub Actions workflow
# https://help.github.com/actions
name: "Nightly"
on:
schedule:
- cron: "0 3 * * *"
env:
GOOGLE_APPLICATION_CREDENTIALS: ${{ github.workspace }}/gcp-key.json
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
deploy:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: |
${{ github.workspace }}/.yarn/cache
${{ github.workspace }}/.yarn/unplugged
${{ github.workspace }}/.yarn/install-state.gz
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
restore-keys: ${{ runner.os }}-yarn-
# Install dependencies
- name: yarn install
run: |
yarn config set enableGlobalCache false
yarn install
# Clean up review deployments for the merged PRs
# - name: Run yarn gh:clean
# env: { GCP_SA_KEY: "${{ secrets.GCP_SA_KEY }}" }
# run: |
# echo "$GCP_SA_KEY" | base64 --decode > "$GOOGLE_APPLICATION_CREDENTIALS"
# gcloud auth activate-service-account --key-file="$GOOGLE_APPLICATION_CREDENTIALS"
# yarn gh:clean