Update/Create Container on VPS #25
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: Update/Create Container on VPS | ||
on: | ||
workflow_run: | ||
workflows: [ "Publish Docker image" ] | ||
types: | ||
- completed | ||
jobs: | ||
deploy: | ||
Check failure on line 10 in .github/workflows/update-docker-image-remote.yml GitHub Actions / Update/Create Container on VPSInvalid workflow file
|
||
runs-on: ubuntu-latest | ||
needs: publish-docker-image.push_to_registry | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v2 | ||
- name: Configure SSH Key | ||
uses: webfactory/[email protected] | ||
with: | ||
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} | ||
- name: Install Dependencies | ||
run: sudo apt-get update && sudo apt-get install -y sshpass | ||
- name: Deploy to VPS | ||
run: | | ||
sshpass -p ${{ secrets.SSH_PASSWORD }} ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} 'docker-compose pull && docker-compose up -d' |