Skip to content

Commit

Permalink
add CI
Browse files Browse the repository at this point in the history
Signed-off-by: 黄子懿 <huangziyi@canaan-creative.com>
  • Loading branch information
MrThanlon committed Nov 21, 2023
1 parent febe39b commit 6a886b6
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# This is a basic workflow to help you get started with Actions

name: Publish to GitHub Pages

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [ master ]

# 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:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# 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@v2

# Run install
- name: Install
run: |
cd tiny-prof-viewer
npm install
# Run build
- name: Build
run: |
cd tiny-prof-viewer
npm run build --base=/tiny-prof
# Deploy
- name: Deploy to GitHub Pages
uses: crazy-max/ghaction-github-pages@v4
with:
target_branch: pages
build_dir: tiny-prof-viewer/dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 6a886b6

Please sign in to comment.