Skip to content

Commit

Permalink
feat/#804 빌드 타임을 개선한다 (#805)
Browse files Browse the repository at this point in the history
* feat: gatsby 빌드 타임 개선

* chore: gatsby v3 이전 버전에서 점진적 빌드를 위한 환경변수 추가

* chore: CircleCI 설정 파일 삭제
  • Loading branch information
cruelladevil authored Nov 11, 2023
1 parent 1a393d6 commit 88dbef7
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 43 deletions.
22 changes: 0 additions & 22 deletions .circleci/config.yml

This file was deleted.

73 changes: 52 additions & 21 deletions .github/workflows/gatsby-build.yml
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

0 comments on commit 88dbef7

Please sign in to comment.