diff --git a/.drone.yml b/.drone.yml index 438c172..7d1706a 100644 --- a/.drone.yml +++ b/.drone.yml @@ -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/ \ No newline at end of file + - cp main /root/web/ \ No newline at end of file