Run lint:fix #13
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: CI | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
on: | |
workflow_dispatch: | |
push: | |
branches: [master] | |
pull_request: | |
branches: [master] | |
jobs: | |
build: | |
name: Build app | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v2 | |
- name: Use Node.js 18.x | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '18' | |
cache: 'pnpm' | |
- name: Setup turbo cache | |
uses: dtinth/setup-github-actions-caching-for-turbo@v1 | |
- name: Install dependencies | |
run: pnpm install | |
- name: Build app | |
env: | |
NUXT_APP_BASE_URL: /font-comparer/ | |
run: pnpm exec turbo run build | |
- name: Upload build artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: ./dist | |
lint: | |
name: Lint code | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v2 | |
- name: Use Node.js 18.x | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '18' | |
cache: 'pnpm' | |
- name: Setup turbo cache | |
uses: dtinth/setup-github-actions-caching-for-turbo@v1 | |
- name: Install dependencies | |
run: pnpm install | |
- name: Lint code | |
run: pnpm exec turbo run lint | |
deploy: | |
needs: [build, lint] | |
name: Deploy to GH Pages | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- name: Deploy to Github Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |