Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
GuiBibeau committed Apr 20, 2024
1 parent 9e6cddc commit f6aecd1
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions .github/workflows/cloudflare-miner.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,20 @@ jobs:
touch subnet/miner-cloudflare/.env
echo CLOUDFLARE_AUTH_TOKEN=${{ secrets.CLOUDFLARE_AUTH_TOKEN }} >> ./subnet/miner-cloudflare/.env
- name: Build Docker Image
run: docker build -t cloudflare-miner ./subnet/miner-cloudflare/
- name: Create SSH key
env:
SSH_PRIVATE_KEY: ${{ secrets.CLOUDFLARE_MINER_SSH_PRIVATE_KEY }}
run: |
mkdir -p ~/.ssh
echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519
- name: Deploy to DigitalOcean
env:
DOCKER_HOST: ssh://root@${{ secrets.MINER_ADDRESS }}
run: |
docker save cloudflare-miner ./subnet/miner-cloudflare/.env | ssh -i ~/.ssh/id_ed25519 root@${{ secrets.MINER_ADDRESS }} "docker load"
docker rm -f cloudflare-miner || true
docker run -d --name cloudflare-miner-container -p 8080:8080 --env-file ./subnet/miner-cloudflare/.env cloudflare-miner
ssh -i ~/.ssh/id_ed25519 root@${{ secrets.MINER_ADDRESS }} "docker exec cloudflare-miner python main.py"
# - name: Build Docker Image
# run: docker build -t cloudflare-miner ./subnet/miner-cloudflare/
# - name: Create SSH key
# env:
# SSH_PRIVATE_KEY: ${{ secrets.CLOUDFLARE_MINER_SSH_PRIVATE_KEY }}
# run: |
# mkdir -p ~/.ssh
# echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_ed25519
# chmod 600 ~/.ssh/id_ed25519
# - name: Deploy to DigitalOcean
# env:
# DOCKER_HOST: ssh://root@${{ secrets.MINER_ADDRESS }}
# run: |
# docker save cloudflare-miner ./subnet/miner-cloudflare/.env | ssh -i ~/.ssh/id_ed25519 root@${{ secrets.MINER_ADDRESS }} "docker load"
# docker rm -f cloudflare-miner || true
# docker run -d --name cloudflare-miner-container -p 8080:8080 --env-file ./subnet/miner-cloudflare/.env cloudflare-miner
# ssh -i ~/.ssh/id_ed25519 root@${{ secrets.MINER_ADDRESS }} "docker exec cloudflare-miner python main.py"

0 comments on commit f6aecd1

Please sign in to comment.