Skip to content

ci: use new style of github pages deployment #111

ci: use new style of github pages deployment

ci: use new style of github pages deployment #111

Workflow file for this run

name: CI
on:
pull_request:
branches:
- main
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'npm'
- name: Install Dependencies
run: npm ci
- name: Test
run: npm test
- name: Build
run: npm run build
- name: Upload Artifact
if: ${{ github.ref_name == 'main' }}
uses: actions/upload-pages-artifact@v4
with:
path: ./dist
deploy:
needs: build
if: ${{ github.ref_name == 'main' }}
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.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4