mirror of
https://github.com/whyour/qinglong.git
synced 2025-05-23 14:56:07 +08:00
34 lines
996 B
YAML
34 lines
996 B
YAML
name: build static
|
|
|
|
on:
|
|
push:
|
|
branches: [ master ]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-node@v1
|
|
with:
|
|
node-version: '14'
|
|
|
|
- name: build front and back
|
|
run: |
|
|
yarn install
|
|
yarn build
|
|
yarn build-back
|
|
|
|
- name: copy to static repo
|
|
env:
|
|
GITHUB_REPO: gitee.com/whyour/qinglong-static
|
|
run: |
|
|
git config --global http.postBuffer 524288000
|
|
git config --global user.email "imwhyour@gmail.com"
|
|
git config --global user.name "whyour"
|
|
git clone https://gitee.com/whyour/qinglong-static.git static
|
|
cd ./static
|
|
cp -rf ../dist ./ && cp -rf ../build ./
|
|
git add .
|
|
git commit --allow-empty -m "copy static at $(date +'%Y-%m-%d %H:%M:%S')"
|
|
git push --quiet "https://whyour:${{ secrets.API_TOKEN }}@${GITHUB_REPO}.git" master:master |