-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
dceaad9
commit a772ccf
Showing
2 changed files
with
47 additions
and
17 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,59 @@ | ||
name: Deploy devnet | ||
name: Deploy Devnet | ||
|
||
on: | ||
push: | ||
branches: [ "devnet" ] | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install system deps | ||
run: apt-get install protobuf-compiler | ||
- name: Build | ||
run: cargo build --verbose --locked | ||
- name: Run tests | ||
run: cargo test --verbose --locked | ||
- name: Check format | ||
run: cargo fmt -- --check | ||
- name: Clippy checks | ||
run: cargo clippy -- -D warnings | ||
|
||
# - name: Create Image Tarball | ||
# run: | | ||
# docker build -t sportchain-node . | ||
# docker save -o sportchain-node.tar sportchain-node | ||
# mkdir -p artifacts | ||
# mv sportchain-node.tar artifacts/ | ||
|
||
# - name: Set up SSH | ||
# uses: webfactory/[email protected] | ||
# with: | ||
# ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} | ||
|
||
- name: Set up SSH | ||
run: | | ||
mkdir -p ~/.ssh/ && touch ~/.ssh/known_hosts | ||
ssh-keyscan ${{ secrets.DEVNET_HOST }} >> ~/.ssh/known_hosts | ||
eval $(ssh-agent) | ||
ssh-add - <<< "${{ secrets.SSH_PRIVATE_KEY }}" | ||
- name: Copy Files to Server | ||
run: | | ||
# scp -r artifacts/* ${{ secrets.DEVNET_USERNAME}}@${{ secrets.DEVNET_HOST }}:/sportchain/ | ||
scp deploy/docker-compose.devnet.yml ${{ secrets.DEVNET_USERNAME}}@${{ secrets.DEVNET_HOST }}:/sportchain/docker-compose.yml | ||
# - name: Copy Files to Server | ||
# env: | ||
# DEVNET_HOST: ${{ secrets.DEVNET_HOST }} | ||
# DEVNET_USERNAME: ${{ secrets.DEVNET_USERNAME }} | ||
# run: | | ||
# scp -r artifacts/* "$DEVNET_USERNAME"@"$DEVNET_HOST":/sportchain/ | ||
# scp deploy/docker-compose.devnet.yml "$DEVNET_USERNAME"@"$DEVNET_HOST":/sportchain/docker-compose.yml | ||
# | ||
# - name: SSH into Server and Deploy | ||
# uses: appleboy/[email protected] | ||
# with: | ||
# host: ${{ secrets.DEVNET_HOST }} | ||
# username: ${{ secrets.DEVNET_USERNAME }} | ||
# key: ${{ secrets.SSH_PRIVATE_KEY }} | ||
# script: | | ||
# cd /sportchain | ||
# docker load -i sportchain-node.tar | ||
# docker-compose down | ||
# docker-compose pull | ||
# docker-compose up -d --build --remove-orphans |
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