Corrected workflow branch selection

This commit is contained in:
Gregory Campbell
2026-06-11 21:55:37 -04:00
parent 1c17e668fe
commit 5591877f99
7 changed files with 26 additions and 58 deletions
-45
View File
@@ -1,45 +0,0 @@
name: CI/CD for React to AWS Amplify
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
# Testing (Runs automatically on push/PR)
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 24
- name: Install dependencies
run: npm ci --legacy-peer-deps
- name: Run Linter
run: npm run lint --if-present
- name: Run Tests
run: npm test -- --watchAll=false
# Deployment (Waits for manual approval after 'test' passes)
deploy:
runs-on: ubuntu-latest
needs: test
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"
+1 -1
View File
@@ -32,7 +32,7 @@ jobs:
strategy:
fail-fast: false
matrix:
language: [ 'javascript' ]
language: [ 'javascript', 'python', 'go' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
+21 -8
View File
@@ -2,24 +2,24 @@ name: Frontend Deploy
on:
push:
branches: [main]
branches: [master]
paths:
- 'frontend/**'
- '.github/workflows/frontend-deploy.yml'
workflow_dispatch:
jobs:
build-and-deploy:
test:
runs-on: ubuntu-latest
defaults:
run:
working-directory: frontend
steps:
- name: Checkout source
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
@@ -29,8 +29,21 @@ jobs:
- name: Install dependencies
run: npm ci --legacy-peer-deps
- name: Build frontend
run: npm run build
- name: Run Linter
run: npm run lint --if-present
- name: Deploy placeholder
run: echo "Deploy the frontend build to AWS Amplify or CloudFront from this step."
- name: Run Tests
run: npm test -- --watchAll=false
# Deployment (Waits for manual approval after 'test' passes)
deploy:
runs-on: ubuntu-latest
needs: test
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"
+1 -1
View File
@@ -2,7 +2,7 @@ name: Go Backend Deploy
on:
push:
branches: [main]
branches: [master]
paths:
- 'backend-go/**'
- '.github/workflows/go-backend-deploy.yml'
+1 -1
View File
@@ -2,7 +2,7 @@ name: Python Backend Deploy
on:
push:
branches: [main]
branches: [master]
paths:
- 'backend-python/**'
- '.github/workflows/python-backend-deploy.yml'
+1 -1
View File
@@ -2,7 +2,7 @@ name: Rust Backend Deploy
on:
push:
branches: [main]
branches: [master]
paths:
- 'backend-rust/**'
- '.github/workflows/rust-backend-deploy.yml'
+1 -1
View File
@@ -2,7 +2,7 @@ name: Test Pipeline Deploy
on:
push:
branches: [main]
branches: [master]
paths:
- 'pipeline-testing/**'
- '.github/workflows/test-pipeline-deploy.yml'