Skip to content

STAR-131 HomePage UI Adjustments #267

STAR-131 HomePage UI Adjustments

STAR-131 HomePage UI Adjustments #267

Workflow file for this run

name: Client Workflow
on:
pull_request:
branches:
- main
paths:
- "client/**"
push:
branches:
- main
paths:
- "client/**"
workflow_dispatch:
defaults:
run:
working-directory: ./client
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Cache Dependencies
id: cache
uses: actions/cache@v3
with:
path: ~/.npm
key: client-node-modules-${{ hashFiles('./client/package-lock.json') }}
- name: Install Dependencies
run: npm ci
- name: Format Code
run: npm run prettier
- name: Lint Code
run: npm run lint
test:
needs: lint
runs-on: ubuntu-latest
# environment: test
env:
VITE_SERVER_URL: ${{ vars.VITE_SERVER_URL }}
VITE_GOOGLE_CLIENT_ID: ${{ vars.VITE_GOOGLE_CLIENT_ID }}
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Cache Dependencies
id: cache
uses: actions/cache@v3
with:
path: ~/.npm
key: client-node-modules-${{ hashFiles('./client/package-lock.json') }}
- name: Install Dependencies
run: npm ci
- name: Format Code
run: npm run prettier
- name: Lint Code
run: npm run lint
- name: Test Code
run: npm run test
build:
needs: test
runs-on: ubuntu-latest
# environment: production
env:
VITE_SERVER_URL: ${{ vars.VITE_SERVER_URL }}
VITE_GOOGLE_CLIENT_ID: ${{ vars.VITE_GOOGLE_CLIENT_ID }}
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Cache Dependencies
id: cache
uses: actions/cache@v3
with:
path: ~/.npm
key: client-node-modules-${{ hashFiles('./client/package-lock.json') }}
- name: Install Dependencies
run: npm ci
- name: Format Code
run: npm run prettier
- name: Lint Code
run: npm run lint
- name: Build Client
id: build-client
run: npm run build
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: client-build-folder
path: ./client/build
deploy:
if: ${{ github.event_name != 'pull_request' }}
needs: build
runs-on: ubuntu-latest
steps:
- name: Download Artifact
uses: actions/download-artifact@v3
with:
name: client-build-folder
path: ./client/build
- name: Show Folder Contents
run: ls -R build
- name: Deploy
run: echo "Deploying..."