supplier_central_frontend/.forgejo/workflows/ci-cd-main.yml
vickytechkey bb7259f7f6
All checks were successful
Beta CI/CD Pipeline / build-and-test (push) Successful in 1m21s
Beta CI/CD Pipeline / deploy-beta (push) Successful in 37s
chore: update action references to use fully qualified URLs and upgrade checkout to v4
2026-09-10 18:47:41 +05:30

53 lines
1.1 KiB
YAML

name: Production CI/CD Pipeline
on:
push:
branches:
- main
jobs:
build-and-test:
runs-on: ubuntu-latest
container: node:22
steps:
- name: Checkout Code
uses: https://github.com/actions/checkout@v4
- name: Install dependencies
run: npm ci
- name: Lint
run: npm run lint
- name: Test
run: npm run test
- name: Build
run: npm run build
- name: Upload Build Artifact
uses: https://github.com/actions/upload-artifact@v3
with:
name: dist
path: dist/
deploy-prod:
needs: build-and-test
runs-on: ubuntu-latest
container: node:22
steps:
- name: Download Build Artifact
uses: https://github.com/actions/download-artifact@v3
with:
name: dist
path: dist
- name: Install AWS CLI
run: |
apt-get update && apt-get install -y awscli
- name: Deploy to S3
run: aws s3 sync dist/ s3://partnerproductionsite --delete
- name: Invalidate CloudFront
run: aws cloudfront create-invalidation --distribution-id EBBGP8E0MLQNJ --paths "/*"