Add web build and deploy to CI
Some checks reported errors
continuous-integration/drone/push Build was killed
continuous-integration/drone Build is passing

This commit is contained in:
Alex Page 2022-02-04 20:18:16 -05:00
parent c17013ac92
commit 7c93fb2bae

View file

@ -6,12 +6,15 @@ steps:
image: rust image: rust
commands: commands:
- apt-get update - apt-get update
- apt-get install -y libasound2-dev g++-mingw-w64-x86-64 - apt-get install -y libasound2-dev g++-mingw-w64-x86-64 npm
- rustup target add x86_64-pc-windows-gnu - rustup target add x86_64-pc-windows-gnu
- rustup toolchain install stable-x86_64-pc-windows-gnu - rustup toolchain install stable-x86_64-pc-windows-gnu
- cargo build --release --verbose --all - rustup target add wasm32-unknown-unknown
- cargo build --release --verbose --all --target x86_64-unknown-linux-gnu
- cargo build --release --verbose --all --target x86_64-pc-windows-gnu - cargo build --release --verbose --all --target x86_64-pc-windows-gnu
- mv target/release/kroz kroz_linux_x86_64 - npm install
- npm run build
- mv target/x86_64-unknown-linux-gnu/release/kroz kroz_linux_x86_64
- mv target/x86_64-pc-windows-gnu/release/kroz.exe kroz_win_x86_64.exe - mv target/x86_64-pc-windows-gnu/release/kroz.exe kroz_win_x86_64.exe
- name: release - name: release
image: plugins/gitea-release image: plugins/gitea-release
@ -29,3 +32,22 @@ steps:
when: when:
event: event:
- tag - tag
- name: deploy
image: alpine
volumes:
- name: krozhtml
path: /html
commands:
- rm -r /html/*.wasm || true
- cp -r dist/* /html/
- chown -R 1000:1000 /html/*
when:
event:
- promote
target:
- production
volumes:
- name: krozhtml
host:
path: /home/alex/docker/kroz/files