This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build to DOM Cloud | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
env: | |
BIN_NAME: todo | |
SERVER_HOST: sga.domcloud.co | |
jobs: | |
copy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: dtolnay/[email protected] | |
- uses: Swatinem/rust-cache@v1 | |
- name: Build release binary | |
run: cargo build --release --locked | |
- run: mkdir bin && cp ./target/release/${{ env.BIN_NAME }} ./bin/ | |
- name: Copy to Remote Server | |
uses: pierrickdelrieu/[email protected] | |
with: | |
host: ${{ env.SERVER_HOST }} | |
ssh_username: ${{ secrets.SSH_USERNAME }} | |
ssh_key: ${{ secrets.SSH_KEY }} | |
ssh_passphrase: '' | |
source_dir: ./bin | |
destination_dir: ./public_html | |
rm: true | |