Skip to content

Commit

Permalink
Fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
willnode committed Jul 14, 2024
1 parent 6de075e commit 74e338f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
20 changes: 5 additions & 15 deletions .github/workflows/domcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,13 @@ on:
- main
workflow_dispatch:


env:
BIN_NAME: todo
SERVER_HOST: sga.domcloud.co
APP_BINARY_PATH: target/release/todo
SERVER_DESTINATION: rocket-rs-todo-app@sga.domcloud.co:./public_html

jobs:
copy:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2
Expand All @@ -23,15 +21,7 @@ jobs:
- 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

run: >
mkdir -p $HOME/.ssh && (echo "${{ secrets.SSH_KEY }}" > $HOME/.ssh/id_rsa) && chmod 0600 $HOME/.ssh/id_rsa
scp -o StrictHostKeyChecking=no -i $HOME/.ssh/id_rsa ${{ env.APP_BINARY_PATH }} ${{ env.SERVER_DESTINATION }}
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,13 @@ a result, you'll need to have `sqlite3` and its headers installed:
* **OS X:** `brew install sqlite`
* **Debian/Ubuntu:** `apt-get install libsqlite3-dev`
* **Arch:** `pacman -S sqlite`

## Add server ID Key

```
ssh-keygen -t rsa -b 4096 -C [email protected]
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
chmod 0600 ~/.ssh/authorized_keys
```

Examine the secret key by `cat ~/.ssh/id_rsa`

0 comments on commit 74e338f

Please sign in to comment.