Skip to content

Commit 88dbef7

Browse files
authored
feat/#804 빌드 타임을 개선한다 (#805)
* feat: gatsby 빌드 타임 개선 * chore: gatsby v3 이전 버전에서 점진적 빌드를 위한 환경변수 추가 * chore: CircleCI 설정 파일 삭제
1 parent 1a393d6 commit 88dbef7

File tree

2 files changed

+52
-43
lines changed

2 files changed

+52
-43
lines changed

.circleci/config.yml

Lines changed: 0 additions & 22 deletions
This file was deleted.

.github/workflows/gatsby-build.yml

Lines changed: 52 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,62 @@
1-
# This is a basic workflow to help you get started with Actions
1+
name: Deploy Tecoble
22

3-
name: build gatsby
4-
5-
# Controls when the action will run.
63
on:
7-
# Triggers the workflow on push or pull request events but only for the master branch
84
push:
9-
branches:
5+
branches:
106
- main
117

12-
# Allows you to run this workflow manually from the Actions tab
13-
workflow_dispatch:
14-
15-
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
168
jobs:
17-
# This workflow contains a single job called "build"
18-
build_gatsby:
19-
name: build
20-
# The type of runner that the job will run on
9+
deploy:
10+
name: Deploy Gatsby Project
2111
runs-on: ubuntu-latest
12+
permissions:
13+
contents: write
14+
concurrency:
15+
group: ${{ github.workflow }}
16+
cancel-in-progress: true
2217

23-
# Steps represent a sequence of tasks that will be executed as part of the job
2418
steps:
25-
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
26-
- uses: actions/checkout@v3
27-
- uses: enriikke/gatsby-gh-pages-action@v2
19+
- name: Checkout Repository
20+
uses: actions/checkout@v3
21+
22+
- name: Use Node.js
23+
uses: actions/setup-node@v3
24+
with:
25+
node-version: '20.4'
26+
cache: npm
27+
28+
- name: Install Dependencies
29+
run: npm ci
30+
31+
- name: Cache Gatsby `.cache` Folder
32+
uses: actions/cache@v3
33+
id: gatsby-cache-folder
34+
with:
35+
path: .cache
36+
key: ${{ runner.os }}-cache-gatsby
37+
restore-keys: ${{ runner.os }}-cache-gatsby
38+
39+
- if: steps.gatsby-cache-folder.outputs.cache-hit == 'true'
40+
run: echo 'gatsby-cache-folder cache hit!'
41+
42+
- name: Cache Gatsby `public` Folder
43+
uses: actions/cache@v3
44+
id: gatsby-public-folder
45+
with:
46+
path: public
47+
key: ${{ runner.os }}-public-gatsby
48+
restore-keys: ${{ runner.os }}-public-gatsby
49+
50+
- if: steps.gatsby-public-folder.outputs.cache-hit == 'true'
51+
run: echo 'gatsby-public-folder cache hit!'
52+
53+
- name: Build Gatsby Project
54+
run: npm run build
55+
env:
56+
GATSBY_EXPERIMENTAL_PAGE_BUILD_ON_DATA_CHANGES: true
57+
58+
- name: Deploy to GitHub Pages
59+
uses: peaceiris/actions-gh-pages@v3
2860
with:
29-
access-token: ${{ secrets.FOR_JAVABLE }}
30-
deploy-branch: gh-pages
31-
gatsby-args: --prefix-paths
61+
github_token: ${{ secrets.FOR_JAVABLE }}
62+
publish_dir: ./public

0 commit comments

Comments
 (0)