From 23402e8e02682ef5cc5d43a45912232be445d15c Mon Sep 17 00:00:00 2001 From: muhammadeko Date: Fri, 6 May 2022 06:52:03 +0700 Subject: [PATCH] add workflows for automatic deployment --- .github/workflows/main.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..5c27d04 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,25 @@ +name: Deployment GC-Tools + +on: + push: + branches: + - main + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - name : Checkout + uses: actions/checkout@v2 + - name : Deploy Docker Using SSH + uses: appleboy/ssh-action@master + with: + host: ${{ secrets.HOST }} + username: ${{ secrets.USERNAME }} + key: ${{ secrets.KEY }} + port: ${{ secrets.PORT }} + script: | + cd ~/project/gc-tools/ + docker-compose down + docker-compose build + docker-compose up -d \ No newline at end of file