Merge pull request #460 from NewMediaCaucus/dev #157
This file contains hidden or 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 to Production | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Set up SSH | |
| uses: webfactory/ssh-agent@v0.5.4 | |
| with: | |
| ssh-private-key: ${{ secrets.STAGING_SSH_KEY }} | |
| - name: Pull latest changes and deploy | |
| run: | | |
| ssh -o StrictHostKeyChecking=no nmcdev@nmcdev.shimmeringtrashpile.com 'cd /home/nmcdev/nmc-website && git pull origin main && docker compose -f docker-compose.prod.yml down && docker network create nmc-website_webnet 2>/dev/null || true && docker compose -f docker-compose.prod.yml up -d --build' |