Skip to content

Commit

Permalink
feat: add pipelines
Browse files Browse the repository at this point in the history
  • Loading branch information
matheus-risrx committed Dec 21, 2024
1 parent 2487765 commit 2e72fc9
Showing 1 changed file with 68 additions and 0 deletions.
68 changes: 68 additions & 0 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: CI/CD Pipeline

on:
pull_request:
branches: [ main ]
push:
branches: [ main ]

jobs:
test:
name: Run Tests
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '22'
cache: 'yarn'

- name: Install Dependencies
run: yarn install --frozen-lockfile

- name: Run Tests
run: yarn test

build:
name: Build
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
cache: 'yarn'

- name: Install Dependencies
run: yarn install --frozen-lockfile

- name: Build
run: yarn build

# deploy:
# name: Deploy to AWS
# needs: build
# if: github.event_name == 'push' && github.ref == 'refs/heads/main'
# runs-on: ubuntu-latest
#
# steps:
# - uses: actions/checkout@v3
#
# - name: Configure AWS credentials
# uses: aws-actions/configure-aws-credentials@v1
# with:
# aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
# aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
# aws-region: your-aws-region
#
# - name: Deploy to AWS
# run: |
# cdk deploy // or something ike that

0 comments on commit 2e72fc9

Please sign in to comment.