This repository has been archived by the owner on Mar 23, 2024. It is now read-only.
pupixipup is starting sueta at the frontend code ☺️ #489
Workflow file for this run
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: Frontend checker, will punish for bad code 🪓😵💫 | |
run-name: ${{ github.actor }} is starting sueta at the frontend code ☺️ | |
on: | |
push: | |
branches: | |
- develop | |
- master | |
paths: | |
- "client/**" | |
pull_request: | |
branches: | |
- develop | |
- master | |
paths: | |
- "client/**" | |
jobs: | |
pipeline: | |
if: github.actor != 'renovate[bot]' | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [18.x] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Node.JS ${{matrix.node-version}} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{matrix.node-version}} | |
cache: 'yarn' | |
cache-dependency-path: ./client/yarn.lock | |
- name: Install yarn and dependencies | |
working-directory: ./client | |
run: | | |
npm install --global yarn | |
yarn install --immutable | |
- name: Lint and Format | |
working-directory: ./client | |
run: | | |
yarn lint:ts:check | |
yarn prettier:check | |
- name: Unit testing 💀💀 | |
working-directory: ./client | |
run: yarn test:unit | |
- name: Build project | |
working-directory: ./client | |
run: yarn build | |
deploy: | |
needs: pipeline | |
if: success() | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set Vercel Args | |
id: vercel_args | |
run: | | |
if [[ "${{ github.event_name }}" == "push" ]]; then | |
echo "::set-output name=args::--prod" | |
else | |
echo "::set-output name=args::" | |
fi | |
- name: Deploy Frontend | |
uses: amondnet/vercel-action@v25 | |
with: | |
vercel-token: ${{ secrets.VERCEL_TOKEN }} | |
vercel-org-id: ${{ secrets.ORG_ID }} | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
vercel-project-id: ${{ secrets.PROJECT_ID }} | |
vercel-args: ${{ steps.vercel_args.outputs.args }} | |
- name: Deploy Storybook | |
uses: amondnet/vercel-action@v25 | |
with: | |
vercel-token: ${{ secrets.VERCEL_TOKEN }} | |
vercel-org-id: ${{ secrets.ORG_ID }} | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
vercel-project-id: ${{ secrets.PROJECT_ID_STORYBOOK }} | |
vercel-args: ${{ steps.vercel_args.outputs.args }} |