supplier_central_frontend/.forgejo/workflows/ci-cd-beta.yml

54 lines
1.2 KiB
YAML
Raw Permalink Normal View History

name: Beta CI/CD Pipeline
on:
push:
branches:
- beta
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-beta:
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://${{ secrets.AWS_S3_BUCKET_BETA }} --delete
- name: Invalidate CloudFront
run: aws cloudfront create-invalidation --distribution-id E2AYEICRZKJ9TM --paths "/*"