Merge branch 'QB-47' into dev #19
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
name: deploy-dev | |
on: | |
push: | |
branches: | |
- dev | |
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_DEV_HOST }} | |
username: ${{ secrets.QBOX_DEV_USER }} | |
key: ${{ secrets.QBOX_DEV_SERVER_KEY }} | |
source: "build/libs/qbox-server-0.0.1-SNAPSHOT.jar" | |
target: "server/" | |
- uses: appleboy/ssh-action@master | |
with: | |
host: ${{ secrets.QBOX_DEV_HOST }} | |
username: ${{ secrets.QBOX_DEV_USER }} | |
key: ${{ secrets.QBOX_DEV_SERVER_KEY }} | |
script: | | |
cd server/build/libs | |
sudo kill -9 $(sudo lsof -t -i:8080) | |
sudo nohup java -jar qbox-server-0.0.1-SNAPSHOT.jar > nohup.out 2> nohup.err < /dev/null & | |
sudo service nginx restart |