Skip to content

Merge branch 'dev' into main #9

Merge branch 'dev' into main

Merge branch 'dev' into main #9

Workflow file for this run

name: deploy-prod
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v1
with:
java-version: '17'
distribution: 'temurin'
- uses: atomicjar/testcontainers-cloud-setup-action@v1
with:
token: ${{ secrets.TC_CLOUD_TOKEN }}
- run: chmod +x ./gradlew
- run: ./gradlew build
- uses: appleboy/[email protected]
with:
host: ${{ secrets.QBOX_PROD_HOST }}
username: ${{ secrets.QBOX_PROD_USER }}
password: ${{ secrets.QBOX_PROD_PASSWORD}}
source: "build/libs/qbox-server-0.0.1-SNAPSHOT.jar"
target: "server/"
- uses: appleboy/ssh-action@master
with:
host: ${{ secrets.QBOX_PROD_HOST }}
username: ${{ secrets.QBOX_PROD_USER }}
password: ${{ secrets.QBOX_PROD_PASSWORD }}
script: |
cd server/build/libs
sudo kill -9 $(sudo lsof -t -i:8080)
nohup java -jar qbox-server-0.0.1-SNAPSHOT.jar > nohup.out 2> nohup.err < /dev/null &
sudo service nginx restart