Skip to content

Commit

Permalink
Merge pull request #21 from AkashiCoin/auto-build
Browse files Browse the repository at this point in the history
feat(build): 支持自动构建并上传
  • Loading branch information
HibiKier authored Aug 23, 2024
2 parents 9133922 + 1c35c9b commit 5b48ebb
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 33,481 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/auto_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: 自动构建并上传

on:
push:
branches: [ "main" ]

jobs:
main:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18'

- name: Install and Build
run: |
yarn install
yarn build
- name: Commit dist
run: |
git checkout --orphan dist
mv dist ../
rm -rf ./*
mv ../dist ./
git config --local user.email '[email protected]'
git config --local user.name 'AkashiCoin'
git add .
git commit -m "chore(dist): upload dist"
- name: Upload dist files
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: dist
repository: HibiKier/zhenxun_bot_webui
force: true
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,6 @@ pnpm-debug.log*
*.sln
*.sw?

dist
dist
package-lock.json
yarn.lock
Loading

0 comments on commit 5b48ebb

Please sign in to comment.