chore: configure staging workflow with qa checks #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Staging Deployment | |
############################################################################# | |
# INFO: Trigger the workflow only when a certain branch is manually deployed | |
############################################################################# | |
on: | |
push: | |
branches: | |
- main | |
# INFO: Configure the CI/CD environment with only read permissions | |
permissions: | |
contents: read | |
jobs: | |
######################################################################## | |
# QA checks for the source code on the front end | |
######################################################################## | |
qa-check-front-end: | |
name: "[FRONT END] Code Quality Check" | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./front-end | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4.1.7 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v4.0.0 | |
with: | |
version: 9 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4.0.2 | |
with: | |
node-version: 20 | |
cache: "pnpm" | |
cache-dependency-path: "./front-end/pnpm-lock.yaml" | |
- name: Install Dependencies | |
run: pnpm install | |
- name: Run QA Check Tools | |
run: | | |
pnpm run lint | |
pnpm run format |