feat: coinbase integration wip #22
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: CI/CD for sibylla | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
ci_cd: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: "1.23" | |
- name: Install dependencies | |
run: go mod download | |
working-directory: sibylla_service | |
- name: Run tests | |
run: go test ./... | |
working-directory: sibylla_service | |
- name: Build binary | |
run: GOOS=linux GOARCH=amd64 go build -o sibylla ./cmd/sibylla_service | |
working-directory: sibylla_service | |
- name: List files before copy | |
run: ls -R | |
working-directory: sibylla_service | |
- name: Copy static files | |
run: mkdir -p static_copy && cp -r static/* static_copy/ | |
working-directory: sibylla_service | |
- name: List files after copy | |
run: ls -R static_copy | |
working-directory: sibylla_service | |
- name: Add private key | |
run: | | |
mkdir -p ~/.ssh | |
printf "%s" "${{ secrets.DO_SSH_KEY }}" > ~/.ssh/id_rsa | |
chmod 600 ~/.ssh/id_rsa | |
- name: Copy files to server | |
run: | | |
scp -i ~/.ssh/id_rsa -o StrictHostKeyChecking=no -r sibylla_service/* root@${{ secrets.DO_DROPLET_IP }}:/root/ | |
- name: Restart service on Droplet | |
run: | | |
ssh -i ~/.ssh/id_rsa -o StrictHostKeyChecking=no root@${{ secrets.DO_DROPLET_IP }} "sudo systemctl restart sibylla" |