Skip to content

Commit

Permalink
ci: support deploy to github pages
Browse files Browse the repository at this point in the history
  • Loading branch information
Carrotzpc committed Jan 10, 2024
1 parent 5b88f00 commit b0f7ab3
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/deploy-ghpages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Deploy to GitHub Pages

on:
push:
branches:
- beta
# Review gh actions docs if you want to further define triggers, paths, etc
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on

jobs:
deploy:
name: Deploy to GitHub Pages
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Node.js v18.x
uses: actions/setup-node@v4
with:
node-version: 18
cache: pnpm

- name: Install pnpm v8.x
uses: pnpm/action-setup@v2
with:
version: 8

- name: Install deps
run: pnpm i

- name: Build website
run: npm run docs:build

# Popular action to deploy to GitHub Pages:
# Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GH_TOKEN }}
publish_dir: ./dist
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: 18
cache: pnpm

- name: Install pnpm v8.x
uses: pnpm/action-setup@v2
Expand Down

0 comments on commit b0f7ab3

Please sign in to comment.