Skip to content

Commit

Permalink
ci: test successful deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
ParzivalEugene committed Aug 26, 2024
1 parent 91e52e9 commit 747b272
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Deploy

on:
push:
branches:
- production

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- 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"
DEPLOYMENT_ID=$(gh api /repos/ParzivalEugene/michkoff-links/deployments | jq -r '.[0].id')
- name: Create new deployment status
run: |
gh api --method POST \
-H "Accept: application/vnd.github+json" \
/repos/${{ github.repository }}/deployments/${{ env.DEPLOYMENT_ID }}/statuses \
-f "state=pending"
-f "auto_inactive=true"
- name: Fake deployment
run: |
sleep 10
- name: Update deployment status
run: |
gh api --method POST \
-H "Accept: application/vnd.github+json" \
/repos/${{ github.repository }}/deployments/${{ env.DEPLOYMENT_ID }}/statuses \
-f "state=success"
-f "auto_inactive=true"

0 comments on commit 747b272

Please sign in to comment.