mirror of
https://github.com/afoim/fuwari.git
synced 2026-01-31 00:53:19 +08:00
ci: 添加 GitHub Actions 部署工作流
添加用于构建和部署到 gh-pages 的 CI 工作流配置,在 main 分支推送时自动触发
This commit is contained in:
25
.github/workflows/deploy.yml
vendored
Normal file
25
.github/workflows/deploy.yml
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
name: Build and Deploy
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
jobs:
|
||||
build-and-deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install Dependencies
|
||||
run: npm install
|
||||
|
||||
- name: Build
|
||||
run: npm run build
|
||||
|
||||
- name: Deploy to page branch
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
publish_dir: ./dist
|
||||
publish_branch: page
|
||||
cname: ${{ secrets.CNAME }}
|
||||
Reference in New Issue
Block a user