Skip to content

Merge pull request #50 from techstartucalgary/CI-and-CD-for-frontend #9

Merge pull request #50 from techstartucalgary/CI-and-CD-for-frontend

Merge pull request #50 from techstartucalgary/CI-and-CD-for-frontend #9

Workflow file for this run

name: CI - Build Frontend
on:
push:
branches: [main]
paths:
- "shatter-web/**"
- ".github/workflows/ci-frontend.yml"
pull_request:
branches: [main]
paths:
- "shatter-web/**"
- ".github/workflows/ci-frontend.yml"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install dependencies
run: |
cd shatter-web
npm ci
- name: Build React app
run: |
cd shatter-web
npm run build
- name: Compress frontend source for artifact
run: |
tar -czf frontend-source-${{ github.run_id }}.tar.gz shatter-web
- name: Upload frontend artifact
uses: actions/upload-artifact@v4
with:
name: frontend-source-${{ github.run_id }}
path: frontend-source-${{ github.run_id }}.tar.gz