Add manual approving for building code in Amplify
This commit is contained in:
@@ -9,7 +9,7 @@ on:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
# Testing
|
||||
# Testing (Runs automatically on push/PR)
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
@@ -29,17 +29,17 @@ jobs:
|
||||
run: npm run lint --if-present
|
||||
|
||||
- name: Run Tests
|
||||
run: npm test -- --watchAll=false # Ensures CI doesn't hang on watch mode
|
||||
run: npm test -- --watchAll=false
|
||||
|
||||
# Deployment (Only runs if 'test' passes)
|
||||
# Deployment (Waits for manual approval after 'test' passes)
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
needs: test
|
||||
if: github.event_name == 'push'
|
||||
environment: production
|
||||
|
||||
steps:
|
||||
- name: Trigger webhook using curl
|
||||
env:
|
||||
WEBHOOK_URL: ${{ secrets.AMPLIFY_WEBHOOK_URL }}
|
||||
run: |
|
||||
curl -i --fail -X POST -H "Content-Type: application/json" -d '{}' "$WEBHOOK_URL"
|
||||
curl -i --fail -X POST -H "Content-Type: application/json" -d '{}' "$WEBHOOK_URL"
|
||||
Reference in New Issue
Block a user