fix: docker file prod .env access #182
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 Droplet | |
| on: | |
| push: | |
| branches: [v2-nextjs] | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| environment: main | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up SSH | |
| uses: webfactory/ssh-agent@v0.9.0 | |
| with: | |
| ssh-private-key: ${{ secrets.DEV_SSH }} | |
| - name: Deploy via Git pull | |
| env: | |
| REPO_URL: https://github.com/${{ github.repository }}.git | |
| run: | | |
| ssh -o StrictHostKeyChecking=no ${{ secrets.DEV_USER }}@${{ secrets.DEV_HOST }} " | |
| mkdir -p /var/www/pdf-service && | |
| cd /var/www/pdf-service && | |
| if [ ! -d .git ]; then | |
| git clone $REPO_URL . && | |
| git checkout v2-nextjs | |
| else | |
| git checkout v2-nextjs | |
| git fetch origin && | |
| git reset --hard origin/v2-nextjs | |
| fi && | |
| make | |
| " |