Skip to content

Commit

Permalink
Add CI
Browse files Browse the repository at this point in the history
  • Loading branch information
willnode committed Jul 13, 2024
1 parent d993a5b commit 126b697
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/domcloud.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
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: Install stable toolchain
uses: actions-rs/toolchain@v1
- uses: Swatinem/rust-cache@v1
- name: Build release binary
uses: actions-rs/cargo@v1
with:
command: build
args: --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

3 changes: 3 additions & 0 deletions rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[toolchain]
channel = "1.79.0"
profile = "minimal"

0 comments on commit 126b697

Please sign in to comment.