-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (40 loc) · 1.11 KB
/
main.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
name: Build and deploy
on:
push:
branches:
- master
schedule:
- cron: '0 0 * * *' # Every day
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@master
with:
persist-credentials: false
- name: Load cache ⚙️
uses: actions/cache@v3
with:
path: |
~/.yarn
${{ github.workspace }}/.next/cache
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('**/yarn.lock') }}-
- name: Install 🔧
run: |
yarn install
- name: Build and static exports 🏗️
env:
TIMEPAD_TOKEN: ${{ secrets.TIMEPAD_TOKEN }}
run: |
yarn typecheck
yarn build
yarn export
- name: Deploy to GH Pages 🚀
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist
publish_branch: gh-pages