Skip to content

Commit 603467d

Browse files
Testing new version of appleboy
1 parent 6e0505f commit 603467d

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

.github/workflows/build.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,3 +84,22 @@ jobs:
8484

8585
- name: Image digest
8686
run: echo ${{ steps.docker_build.outputs.digest }}
87+
88+
- name: Pull image and start container in deploy host
89+
uses: appleboy/ssh-action@v1.0.11
90+
with:
91+
host: ${{ env.DEPLOYMENT_HOST }}
92+
username: ${{ secrets.DEPLOY_USER }}
93+
key: ${{ secrets.DEPLOY_SSH_KEY }}
94+
proxy_host: ${{ secrets.DEPLOY_PROXY_HOST }}
95+
proxy_username: ${{ secrets.DEPLOY_PROXY_USER }}
96+
proxy_key: ${{ secrets.DEPLOY_PROXY_KEY }}
97+
script: |
98+
cd ~/codey/${{env.DEPLOYMENT_TARGET}}
99+
curl -o docker-compose.yml https://raw.githubusercontent.com/uwcsc/codeybot/main/docker/${{env.DEPLOYMENT_TARGET}}/docker-compose.yml
100+
docker pull uwcsclub/codey-bot:${{ github.event_name == 'push' && github.sha || env.RELEASE_TAG }}
101+
echo "TAG=${{ github.event_name == 'push' && github.sha || env.RELEASE_TAG }}" > .env
102+
echo "DISCORD_TOKEN=${{ env.DISCORD_TOKEN }}" >> .env
103+
echo "CRUNCHBASE_API_KEY=${{ secrets.CRUNCHBASE_API_KEY }}" >> .env
104+
docker compose down
105+
docker compose up -d

0 commit comments

Comments
 (0)