deployphp / action

GitHub Action for Deployer
MIT License
227 stars 46 forks source link

BUG: Cannot execute two commands with Deployer Action in one workflow #31

Open lbajsarowicz opened 2 years ago

lbajsarowicz commented 2 years ago

Workflow (part)

      - name: Build
        uses: deployphp/action@v1
        with:
          private-key: "${{ secrets.DEV_PRIVATE_KEY }}"
          deployer-binary: "vendor/bin/dep"
          dep: "build"
      - name: DEV environment deployment
        uses: deployphp/action@v1
        with:
          private-key: "${{ secrets.DEV_PRIVATE_KEY }}"
          deployer-binary: "vendor/bin/dep"
          dep: "deploy-artifact develop"

Result

image

Upvote & Fund

Fund with Polar

jamsch commented 11 months ago

Just encountered this as well. You need to add skip-ssh-setup: true to your second step

      - name: Deploy
        uses: deployphp/action@v1
        with:
          private-key: ${{ secrets.SSH_PRIVATE_KEY }}
          dep: deploy stage=staging -v --branch=${{ github.ref_name }}
      - name: Unlock deploy if job was cancelled
        uses: deployphp/action@v1
        with:
          skip-ssh-setup: true
          private-key: ${{ secrets.SSH_PRIVATE_KEY }}
          dep: deploy:unlock stage=staging -v
        if: cancelled()