Skip to content

Commit

Permalink
Add workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
makenowjust committed Jan 2, 2025
1 parent f38f711 commit b4bba3f
Showing 1 changed file with 70 additions and 0 deletions.
70 changes: 70 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Main

on:
push:
branches: [main]
pull_request:
workflow_dispatch:

jobs:
lint:
runs-on: ubuntu-latest
name: Lint
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '21.x'
- uses: pnpm/action-setup@v4
with:
version: 9
- name: Lint
run: pnpm lint

test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '21.x'
- uses: pnpm/action-setup@v4
with:
version: 9
- name: Lint
run: pnpm test run

build:
needs: [lint, test]
if: github.ref_name == 'main'
runs-on: ubuntu-latest
name: Build
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '21.x'
- uses: pnpm/action-setup@v4
with:
version: 9
- name: Build
run: pnpm build
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: dist

deploy:
needs: build
name: Deploy to GitHub Pages
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

0 comments on commit b4bba3f

Please sign in to comment.