mirror of
https://github.com/whyour/qinglong.git
synced 2025-05-23 14:56:07 +08:00
添加自动编译 action
This commit is contained in:
parent
633fe7707c
commit
3373911b7b
34
.github/workflows/ build.yml
vendored
Normal file
34
.github/workflows/ build.yml
vendored
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
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: |
|
||||||
|
mkdir -p static
|
||||||
|
cd ./static
|
||||||
|
cp -rf ../dist ./ && cp -rf ../build ./
|
||||||
|
git init && git add .
|
||||||
|
git config user.name "whyour"
|
||||||
|
git config user.email "imwhyour@gmail.com"
|
||||||
|
git add .
|
||||||
|
git commit -m "copy static at $(date +'%Y-%m-%d %H:%M:%S')"
|
||||||
|
git push --force --quiet "https://whyour:${{ secrets.API_TOKEN }}@${GITHUB_REPO}.git" master:master
|
|
@ -284,6 +284,7 @@ const Crontab = () => {
|
||||||
const result = [...value];
|
const result = [...value];
|
||||||
result.splice(index, 1, {
|
result.splice(index, 1, {
|
||||||
...record,
|
...record,
|
||||||
|
pid: null,
|
||||||
status: CrontabStatus.idle,
|
status: CrontabStatus.idle,
|
||||||
});
|
});
|
||||||
setValue(result);
|
setValue(result);
|
||||||
|
|
|
@ -31,7 +31,7 @@ const CronLogModal = ({
|
||||||
if (localStorage.getItem('logCron') === cron._id) {
|
if (localStorage.getItem('logCron') === cron._id) {
|
||||||
const log = data.data as string;
|
const log = data.data as string;
|
||||||
setValue(log || '暂无日志');
|
setValue(log || '暂无日志');
|
||||||
if (log && !log.includes('执行结束')) {
|
if (log && !log.includes('执行结束') && visible) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
getCronLog();
|
getCronLog();
|
||||||
}, 2000);
|
}, 2000);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user