Skip to content

Commit

Permalink
feat: Actions frontend workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
RezaRahemtola committed Jun 27, 2024
1 parent 6f35bdd commit 4508c54
Showing 1 changed file with 78 additions and 0 deletions.
78 changes: 78 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: Main workflow

on: [ push ]

jobs:
build:
name: "Front: Build"
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./front
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'yarn'
cache-dependency-path: 'yarn.lock'

- name: Install dependencies
run: yarn

- name: Build
run: yarn build

lint:
name: "Front: Lint"
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./front
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'yarn'
cache-dependency-path: 'yarn.lock'

- name: Install dependencies
run: yarn

- name: Run ESLint
run: yarn lint > eslint-results

- name: Get eslint results
uses: actions/upload-artifact@v4
if: failure()
with:
name: eslint-results
path: eslint-results
retention-days: 5

format:
name: "Front: Format"
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'yarn'
cache-dependency-path: 'yarn.lock'

- name: Install dependencies
run: yarn

- name: Run Prettier
run: yarn format

0 comments on commit 4508c54

Please sign in to comment.