diff --git a/.forgejo/workflows/push-prod-test.yaml b/.forgejo/workflows/push-prod-test.yaml deleted file mode 100644 index 70065d6..0000000 --- a/.forgejo/workflows/push-prod-test.yaml +++ /dev/null @@ -1,36 +0,0 @@ -on: - push: - branches: - - dev - -env: - EXEC: arimelody-web - -jobs: - deploy: - runs-on: docker - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Set up Go - uses: actions/setup-go@v4 - with: - go-version: '^1.25.1' - - - name: Run tests - run: go test -v ./model - - - name: Build binary - run: make build - - - name: Bundle tarball - run: make bundle - - - name: Set up SSH keys - uses: webfactory/ssh-agent@v0.9.0 - with: - ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} - - - name: Copy to production server - run: echo "we'll just pretend it works lol" diff --git a/.forgejo/workflows/push-prod.yaml b/.forgejo/workflows/push-prod.yaml index 4a7f7a5..5d6a0aa 100644 --- a/.forgejo/workflows/push-prod.yaml +++ b/.forgejo/workflows/push-prod.yaml @@ -34,11 +34,12 @@ jobs: - name: Copy to production server run: | - mkdir -p ~/.ssh/ export REMOTE=${{ secrets.SSH_USER }}@{{ secrets.SSH_HOST }} export PORT=${{ secrets.SSH_PORT }} echo "${{ secrets.SSH_PRIVATE_KEY }}" > scp -P ${{ secrets.SSH_PORT }} ./$EXEC.tar.gz $REMOTE:~/ + + - name: Restart production ssh -o StrictHostKeyChecking=no $REMOTE -p $PORT << EOF cd ${{ secrets.DEPLOY_DIR }} tar xzf ~/$EXEC.tar.gz"