diff --git a/.forgejo/workflows/push-prod.yaml b/.forgejo/workflows/push-prod.yaml deleted file mode 100644 index 8e732a6..0000000 --- a/.forgejo/workflows/push-prod.yaml +++ /dev/null @@ -1,45 +0,0 @@ -on: - push: - branches: - - main - -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 - - - 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: | - 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:~/ - ssh -o StrictHostKeyChecking=no $REMOTE -p $PORT << EOF - cd ${{ secrets.DEPLOY_DIR }} - tar xzf ~/$EXEC.tar.gz" - echo "restart" > ./deploy.sock - EOF -