fix: removing temp files from target #41
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: build-and-deploy-tarball | |
| on: | |
| push: | |
| branches: ["master", "ci/cd-implementation"] | |
| jobs: | |
| build-and-deploy-tarball: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v4 | |
| - name: setup for docker building tools | |
| uses: docker/setup-buildx-action@v3 | |
| - name: install utilities | |
| run: | | |
| sudo apt-get install docker-compose | |
| - name: create .env for remote | |
| run: | | |
| cat > .env <<EOF | |
| BACKEND_PORT=${{ secrets.BACKEND_PORT }} | |
| WEBVIEW_PORT=${{ secrets.WEBVIEW_PORT }} | |
| VITE_BACKEND-URL=${{ secrets.VITE_BACKEND_URL }} | |
| BACKEND_HOST=${{ secrets.BACKEND_HOST }} | |
| WEBVIEW_URL=${{ secrets.WEBVIEW_URL }} | |
| EOF | |
| - name: build images | |
| run: | | |
| docker-compose -f building.yml build | |
| - name: save image | |
| run: | | |
| mkdir images | |
| docker save milk-folio_backend:latest milk-folio_webview:latest > ./images/images.tar | |
| - name: Copy tars to VPS | |
| uses: appleboy/scp-action@master | |
| with: | |
| host: ${{ secrets.VPS_HOST }} | |
| username: ${{ secrets.VPS_USER }} | |
| key: ${{ secrets.VPS_SSH_KEY }} | |
| source: "./images/*" | |
| target: "/home/${{ secrets.VPS_USER }}/" | |
| overwrite: true | |
| debug: true |