Skip to content

블로그 포스트 수정 #184

블로그 포스트 수정

블로그 포스트 수정 #184

Workflow file for this run

name: Deploy Docusaurus to GitHub Pages
on:
push:
branches:
- main # main 브랜치에 푸시될 때 배포
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '23'
- name: Install dependencies
run: npm ci
- name: Build the site
run: npm run build
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GH_ACTIONS_TOKEN }}
publish_dir: ./build
cname: johnycho.dev
- name: Wait for 30 seconds
run: sleep 30
# API Reference
# https://www.algolia.com/doc/rest-api/crawler/#tag/actions/operation/startReindex
# DOCSEARCH_CRAWLER_CREDENTIALS is a base64-encoded string <Crawler User Id>:<Crawler API Key>
# Crawler ID는 크롤러 체크후 'Manage Crawlers' 버튼 클릭하거나, 크롤러 페이지 url로 알 수 있음
- name: Trigger Algolia DocSearch Crawler
run: |
curl -X POST -H "Content-Type: application/json" \
-H "Authorization: Basic ${{ secrets.DOCSEARCH_CRAWLER_CREDENTIALS }}" \
"https://crawler.algolia.com/api/1/crawlers/41e8b906-04b7-486c-848e-73e08f8fafcc/reindex"