Skip to content

demo

demo #12

Workflow file for this run

name: Demo
on:
push:
branches: main
paths:
- .github/workflows/demo.yml
- demo/**
jobs:
build:
runs-on: ubuntu-latest
env:
working-directory: demo
steps:
- uses: actions/checkout@v4
with:
sparse-checkout: |
${{env.working-directory}}
- uses: actions/setup-node@v4
with:
registry-url: 'https://registry.npmjs.org'
node-version-file: ${{env.working-directory}}/package.json
cache: 'npm'
cache-dependency-path: ${{env.working-directory}}/package-lock.json
- run: npm i
working-directory: ${{env.working-directory}}
- run: npm run lint
working-directory: ${{env.working-directory}}
# - run: npm test
# working-directory: ${{env.working-directory}}
- run: npm run build
working-directory: ${{env.working-directory}}
- id: deployment
uses: actions/upload-pages-artifact@v3
with:
path: ${{env.working-directory}}/dist
deploy:
needs: build
permissions:
pages: write
id-token: write
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
uses: actions/deploy-pages@v4