Skip to content

Commit

Permalink
add pr workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
sebalr committed Jul 6, 2024
1 parent 69710c2 commit 527356f
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 8 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/production-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Deploy to PRODUCTION

on:
workflow_run:
workflows: ["CI"]
types:
- completed

jobs:
deploy:
if: ${{ github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.head_branch == 'main' }}
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Deploy to QA
run: |
# Replace with your deployment commands
echo "Deploying to QA environment from branch: ${{ github.event.workflow_run.head_branch }}"
21 changes: 21 additions & 0 deletions .github/workflows/qa-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Deploy to QA

on:
workflow_run:
workflows: ["CI"]
types:
- completed

jobs:
deploy:
if: ${{ github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.head_branch != 'main' }}
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Deploy to QA
run: |
# Replace with your deployment commands
echo "Deploying to QA environment from branch: ${{ github.event.workflow_run.head_branch }}"
15 changes: 7 additions & 8 deletions .github/workflows/test.yml → .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
name: CI

on:
push:
pull_request:
branches:
- main
pull_request:
- dev
push:
branches:
- "*"
- main
- dev

jobs:
build:
Expand All @@ -19,13 +21,10 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 20.x
node-version: 20

- name: Install dependencies
run: npm install

- name: Run test
- name: Run tests
run: npm run test

- name: Build Angular project
run: npm run build

0 comments on commit 527356f

Please sign in to comment.