Skip to content

Deploy to remote server #2606

Deploy to remote server

Deploy to remote server #2606

Workflow file for this run

name: Deploy to remote server
on:
schedule:
- cron: 0 */6 * * *
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Deploy Docker Image
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.SSH_USER }}
key: ${{ secrets.SSH_KEY }}
command_timeout: 10m
script: |
docker pull cjbi/admin3:latest
docker rm -f admin3 || true
docker run -p 8082:8080 -e JAVA_OPTS="-Dserver.servlet.context-path=/ -Dfile.encoding=UTF-8 -Duser.timezone=GMT+8 -Dspring.jpa.hibernate.ddl-auto=create -Dspring.datasource.url=${{ secrets.DS_JDBC_URL }} -Dspring.datasource.username=${{ secrets.DS_USERNAME }} -Dspring.datasource.password=${{ secrets.DS_PASSWORD }}" -d --name admin3 cjbi/admin3:latest