Skip to content

Add hash instead of unsafe-inline for naive-ui (#33) #79

Add hash instead of unsafe-inline for naive-ui (#33)

Add hash instead of unsafe-inline for naive-ui (#33) #79

name: "Build App & Deploy to Github Pages"
on:
push:
branches:
- master
workflow_dispatch: { }
jobs:
build_and_deploy:
name: Build and Deploy
concurrency:
group: build-and-deploy
cancel-in-progress: true
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install dependencies
run: npm ci
- name: Run lint
run: npm run lint
- name: Run prettier
run: npm run format -- --check
- name: Run tests
run: npm run test:unit -- --run
- name: Build project
run: npm run build
- name: Prerender project
run: npm run prerender
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Run e2e tests
run: PLAYWRIGHT_USE_BUILD=1 npm run test:e2e
- name: Deploy
uses: peaceiris/actions-gh-pages@v4
if: ${{ github.ref == 'refs/heads/master' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist
publish_branch: gh-pages