Skip to content

add workflows

add workflows #1

name: Build and Deploy
on:
push:
branches:
- main
jobs:
lint-and-test:
uses: ./.github/workflows/lint-and-test.yml
build:
runs-on: ubuntu-latest
needs: [lint-and-test]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22.11
- run: |
npm install
npm run build
- uses: actions/upload-pages-artifact@v3
id: upload
with:
path: dist
deploy:
runs-on: ubuntu-latest
needs: [build]
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
environment:
name: github-pages
url: ${{ steps.upload.outputs.page_url }}
steps:
- uses: actions/deploy-pages@v4