Skip to content

에셋타운 1편: 어드민 (Sanity) (#98) #113

에셋타운 1편: 어드민 (Sanity) (#98)

에셋타운 1편: 어드민 (Sanity) (#98) #113

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