forked from turms-im/turms
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a GA to deploy the playground on AWS automatically turms-im#888
- Loading branch information
1 parent
3056641
commit 158c422
Showing
1 changed file
with
35 additions
and
0 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 |
---|---|---|
@@ -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 |