forked from COSCUP/2022-survey
-
Notifications
You must be signed in to change notification settings - Fork 1
54 lines (43 loc) · 1.22 KB
/
Deploy.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
name: Deploy
on:
push:
branches:
- main
schedule:
- cron: '*/5 * * * *'
workflow_dispatch:
permissions:
contents: write
jobs:
deploy:
runs-on: ${{ matrix.os }}
env:
VITE_HCAPTCHA_SITE_KEY: ${{secrets.VITE_HCAPTCHA_SITE_KEY}}
VITE_BACKEND_URL: ${{secrets.VITE_BACKEND_URL}}
GOOGLE_SERVICE_ACCOUNT_EMAIL: ${{secrets.GOOGLE_SERVICE_ACCOUNT_EMAIL}}
GOOGLE_PRIVATE_KEY: ${{secrets.GOOGLE_PRIVATE_KEY}}
RESULT_SPREADSHEET_ID: ${{secrets.RESULT_SPREADSHEET_ID}}
strategy:
matrix:
os: [ubuntu-latest]
node: [16]
steps:
- name: Checkout 🛎
uses: actions/checkout@master
- name: Setup node env 🏗
uses: actions/[email protected]
with:
node-version: ${{ matrix.node }}
cache: 'yarn'
- name: Install dependencies 👨🏻💻
run: yarn install --frozen-lockfile
- name: Fetch result 🛰
run: yarn fetch:result
- name: Build production 🚧
run: yarn build
- name: Deploy 📡
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist
force_orphan: true