-
-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: gatsby 빌드 타임 개선 * chore: gatsby v3 이전 버전에서 점진적 빌드를 위한 환경변수 추가 * chore: CircleCI 설정 파일 삭제
- Loading branch information
1 parent
1a393d6
commit 88dbef7
Showing
2 changed files
with
52 additions
and
43 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,62 @@ | ||
# This is a basic workflow to help you get started with Actions | ||
name: Deploy Tecoble | ||
|
||
name: build gatsby | ||
|
||
# Controls when the action will run. | ||
on: | ||
# Triggers the workflow on push or pull request events but only for the master branch | ||
push: | ||
branches: | ||
branches: | ||
- main | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
# This workflow contains a single job called "build" | ||
build_gatsby: | ||
name: build | ||
# The type of runner that the job will run on | ||
deploy: | ||
name: Deploy Gatsby Project | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
concurrency: | ||
group: ${{ github.workflow }} | ||
cancel-in-progress: true | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
- uses: actions/checkout@v3 | ||
- uses: enriikke/gatsby-gh-pages-action@v2 | ||
- name: Checkout Repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Use Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '20.4' | ||
cache: npm | ||
|
||
- name: Install Dependencies | ||
run: npm ci | ||
|
||
- 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: npm run build | ||
env: | ||
GATSBY_EXPERIMENTAL_PAGE_BUILD_ON_DATA_CHANGES: true | ||
|
||
- name: Deploy to GitHub Pages | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
access-token: ${{ secrets.FOR_JAVABLE }} | ||
deploy-branch: gh-pages | ||
gatsby-args: --prefix-paths | ||
github_token: ${{ secrets.FOR_JAVABLE }} | ||
publish_dir: ./public |