Skip to content

Commit

Permalink
ci: fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ParzivalEugene committed Aug 26, 2024
1 parent b20d191 commit 47b41f7
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,19 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Remove old deployment
run: |
PREVIOUS_DEPLOYMENT_ID=$(gh api /repos/ParzivalEugene/michkoff-links/deployments | jq -r '.[0].id')
gh api --method DELETE /repos/ParzivalEugene/michkoff-links/deployments/${PREVIOUS_DEPLOYMENT_ID} || true
env:
GH_TOKEN: ${{ github.token }}

- name: Create new deployment
run: |
gh api --method POST \
-H "Accept: application/vnd.github+json" \
/repos/${{ github.repository }}/deployments \
-f "ref=production" \
-f "environment=production"
-f "ref=production"
DEPLOYMENT_ID=$(gh api /repos/ParzivalEugene/michkoff-links/deployments | jq -r '.[0].id')
env:
DEPLOYMENT_ID: ${{ steps.create.outputs.DEPLOYMENT_ID }}
Expand All @@ -27,7 +33,7 @@ jobs:
gh api --method POST \
-H "Accept: application/vnd.github+json" \
/repos/${{ github.repository }}/deployments/${{ env.DEPLOYMENT_ID }}/statuses \
-f "state=pending"
-f "state=pending" \
-f "auto_inactive=true"
env:
DEPLOYMENT_ID: ${{ steps.create.outputs.DEPLOYMENT_ID }}
Expand All @@ -42,7 +48,7 @@ jobs:
gh api --method POST \
-H "Accept: application/vnd.github+json" \
/repos/${{ github.repository }}/deployments/${{ env.DEPLOYMENT_ID }}/statuses \
-f "state=success"
-f "state=success" \
-f "auto_inactive=true"
env:
DEPLOYMENT_ID: ${{ steps.create.outputs.DEPLOYMENT_ID }}
Expand Down

0 comments on commit 47b41f7

Please sign in to comment.