From 4e7863066a0e2a179ac4b99daf7cbc8cbf29cbf3 Mon Sep 17 00:00:00 2001 From: Victor Vlasenko Date: Fri, 2 Jun 2023 18:12:54 +0300 Subject: [PATCH] Adds deployment task to ausk.sysgears.com --- .github/workflows/deploy.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000000..a02f772828 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,26 @@ +name: Deploy + +on: + push: + branches: [ master ] + pull_request: + +jobs: + deploy: + steps: + - name: Deploy + run: | + install -m 600 -D /dev/null ~/.ssh/id_rsa + echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa + ssh-keyscan -H ausk.sysgears.com > ~/.ssh/known_hosts + ssh node@ausk.sysgears.com -p 8222 << EOF + rm -rf ausk.old + mv apollo-universal-starter-kit ausk.old + git clone --depth 1 https://github.com/sysgears/apollo-universal-starter-kit + cd apollo-universal-starter-kit + yarn + yarn heroku-postbuild + killall node + rm -rf ../ausk.old + nohup yarn start & + EOF