Move workflow file to workflow folder #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: 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 | |
run: turbo run build | |
- name: Upload build artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: dist | |
path: .output/public | |
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: Build app | |
run: turbo run lint | |
deploy: | |
needs: [build, lint] | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- name: Deploy to Github Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 | |
with: | |
artifact_name: dist |