Skip to content

Commit

Permalink
Add demo page deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
slhmy committed Oct 1, 2023
1 parent 6ec9c38 commit 98b9c35
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/deploy-demo-to-gh-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Deploy Demo to gh-pages

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Install dependencies
run: npm ci

- name: Build
run: npm run build-mock

- name: Deploy
if: ${{ github.event_name != 'pull_request' }}
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
"start": "vite",
"start-mock": "vite --mode mock",
"build": "vite build",
"build-mock": "vite build --mode mock",
"build-and-zip": "vite build && ./script/zip-dist.sh",
"init-mock": "npx msw init public --no-save",
"prettier": "npx prettier --write \"src/**/*.{ts,tsx}\"",
Expand Down

0 comments on commit 98b9c35

Please sign in to comment.