修改自动打包脚本
continuous-integration/drone/push Build is failing Details

This commit is contained in:
giaogiao 2023-09-11 17:17:53 +08:00
parent fad1ed2169
commit 56ebb2ad2d
1 changed files with 20 additions and 11 deletions

View File

@ -8,27 +8,36 @@ steps:
commands:
- go test
- name: clone_build_web
- name: clone_web
image: alpine/git
volumes:
- name: cache
path: /web
commands:
- cd /web
- git clone https://git.shagain.club/lingling/go_echo_wol_web.git .
- git checkout master
- name: build_web
image: node
volumes:
- name: bulid-workspace
host:
path: /root/web
- name: cache
path: /web
commands:
- git clone https://git.shagain.club/lingling/go_echo_wol_web.git
- git checkout master
- cd /web/go_echo_wol_web
- npm install yarn
- cd go_echo_wol_web
- yarn
- yarn build
- cp -r ./build /root/web/build
- name: build
image: golang
volumes:
- name: bulid-workspace
host:
path: /root/web
- name: cache
path: /go
- name: outdir
host:
path: /root/web
commands:
- rm -rf ./app/*
- cp -r /web/build ./app
@ -37,4 +46,4 @@ steps:
- sed 's/\/logo192.png/\/static\/logo192.png/g' ./app/index.html
- sed 's/\/manifest.json/\/static\/manifest.json/g' ./app/index.html
- go build -o main
- cp main /root/web/build/
- cp main /root/web/