ci: changes #51
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 | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
if: "!contains(github.event.head_commit.message, 'ci') && !contains(github.event.head_commit.message, 'docs:')" | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Setup SSH | |
uses: webfactory/[email protected] | |
with: | |
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} | |
- name: Deploy | |
run: | | |
ssh -o StrictHostKeyChecking=no ${{ secrets.VPS_USERNAME }}@${{ secrets.VPS_HOST }} << 'EOF' | |
cd skyhelper | |
git pull | |
docker stop skyhelper | |
docker rm skyhelper | |
docker build -t skyhelper . | |
docker run -d --name skyhelper -p 5000:5000 --restart always skyhelper | |
EOF |