修改打包规则

This commit is contained in:
giaogiao 2023-09-11 16:59:25 +08:00
parent 3634111e3b
commit e83d55a771
1 changed files with 25 additions and 1 deletions

View File

@ -8,7 +8,31 @@ steps:
commands: commands:
- go test - go test
- name: clone_build_web
image: node
volumes:
- name: bulid-workspace
path: /web
commands:
- git clone https://git.shagain.club/lingling/go_echo_wol_web.git
- git checkout master
- npm install yarn
- cd go_echo_wol_web
- yarn
- yarn build
- cp -r ./build /web/build
- name: build - name: build
image: golang image: golang
volumes:
- name: bulid-workspace
path: /web
commands: commands:
- go build - rm -rf ./app/*
- cp -r /web/build ./app
- sed 's/\/static/\/static\/static/g' ./app/index.html
- sed 's/\/favicon.ico/\/static\/favicon.ico/g' ./app/index.html
- 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 /web/build/