Skip to content

Commit

Permalink
Add a GA to deploy the playground on AWS automatically turms-im#888
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesChenX committed Jan 22, 2022
1 parent 3056641 commit 158c422
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/deploy-playground.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Deploy Playground

on:
workflow_dispatch:
workflow_run:
branches:
- master
workflows:
- "Publish turms-admin"
- "Publish turms-gateway"
- "Publish turms-service"
types:
- completed

jobs:
deploy:
if: ${{ !github.event.workflow_run || github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-20.04
steps:
- name: SSH
uses: appleboy/[email protected]
with:
host: ${{ secrets.PLAYGROUND_SSH_HOST }}
username: ${{ secrets.PLAYGROUND_SSH_USERNAME }}
key: ${{ secrets.PLAYGROUND_SSH_KEY }}
script_stop: true
script: |
cd /opt/turms
sudo docker-compose -f docker-compose.standalone.yml down
sudo docker system prune -a -f
sudo docker system prune --volumes -f
rm -rf /var/log/journal
sudo git pull
sudo git reset --hard
sudo ENV=dev,demo docker-compose -f docker-compose.standalone.yml --profile monitoring up --force-recreate -d

0 comments on commit 158c422

Please sign in to comment.