BeepSortRust/.github/workflows/main.yml
Rolf Martin Glomsrud 69e566c781
Create main.yml
First build and deploy
2023-02-26 02:37:55 +01:00

35 lines
1,016 B
YAML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

name: Build and deploy to prod!
on:
push:
branches:
-master
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Install Rust
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
- name: Add wasm with rustup
run: |
rustup target add wasm32-unknown-unknown
- name: build-wasm-file
run: |
cargo build --target wasm32-unknown-unknown --release
- name: move index.html into target
run: |
cp index.html target/wasm32-unknown-unknown/release/index.html
- name: rsync files
uses: burnett01/rsync-deployments@5.2
with:
switches: -avzr --delete
path: target/wasm32-unknown-unknown/release/
remote_path: /home/beepsort/deploy
remote_host: ${{ secrets.SERVER_IP }}
remote_user: ${{ beepsort }}
remote_key: ${{ secrets.SSH_PRIVATE_KEY }}
remote_port: ${{ 6969 }}