mirror of
https://github.com/afoim/fuwari.git
synced 2026-01-31 09:03:18 +08:00
ci: 添加GitHub Actions部署工作流并删除旧文件
添加新的部署工作流配置文件,包含pnpm安装、Node.js设置、依赖安装、构建和部署到gh-pages分支的步骤。同时删除旧的未使用的部署配置文件。
This commit is contained in:
39
.github/workflows/deploy.yml-nouse
vendored
39
.github/workflows/deploy.yml-nouse
vendored
@@ -1,39 +0,0 @@
|
||||
name: Build and Deploy
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
jobs:
|
||||
build-and-deploy:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install pnpm
|
||||
uses: pnpm/action-setup@v2
|
||||
with:
|
||||
version: 9
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 20
|
||||
cache: 'pnpm'
|
||||
|
||||
- name: Install Dependencies
|
||||
run: pnpm install
|
||||
|
||||
- name: Build
|
||||
run: pnpm 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 }}
|
||||
commit_message: ${{ github.event.head_commit.message }}
|
||||
Reference in New Issue
Block a user