-
Notifications
You must be signed in to change notification settings - Fork 1
60 lines (49 loc) ยท 1.63 KB
/
deploy-cf-pages.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
56
57
58
59
60
on:
push:
branches:
- main
name: Pages ๋ฐฐํฌ๋ฅผ ํ์.
jobs:
deploy:
name: Pages ๋ฐฐํฌ๋ฅผ ํ์.
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18.12.1'
cache: yarn
- name: Install Dependencies
run: yarn install --immutable
- name: Cache Gatsby `.cache` Folder
uses: actions/cache@v3
id: gatsby-cache-folder
with:
path: .cache
key: ${{ runner.os }}-cache-gatsby
restore-keys: |
${{ runner.os }}-cache-gatsby
- if: steps.gatsby-cache-folder.outputs.cache-hit == 'true'
run: echo 'gatsby-cache-folder cache hit!'
- name: Cache Gatsby `public` Folder
uses: actions/cache@v3
id: gatsby-public-folder
with:
path: public
key: ${{ runner.os }}-public-gatsby
restore-keys: |
${{ runner.os }}-public-gatsby
- if: steps.gatsby-public-folder.outputs.cache-hit == 'true'
run: echo 'gatsby-public-folder cache hit!'
- name: Build Gatsby Project
run: |
yarn build
env:
# incremental builds
# https://www.gatsbyjs.org/docs/page-build-optimizations-for-incremental-data-changes/
GATSBY_EXPERIMENTAL_PAGE_BUILD_ON_DATA_CHANGES: true
- name: ์๋น์ค๋ฅผ Cloudflare pages์ ๋ฐฐํฌํด์
uses: cloudflare/[email protected]
with:
apiToken: ${{ secrets.CF_API_TOKEN }}
command: pages publish ./public --project-name=junghyeonsu-dev