Skip to content

chore(deps): dependabot actions (#49) #107

chore(deps): dependabot actions (#49)

chore(deps): dependabot actions (#49) #107

Workflow file for this run

name: Pages
on:
push:
branches:
paths:
- 'src/*'
- '*.json'
- '.github/workflows/pages.yml'
pull_request:
branches:
paths:
- 'src/*'
- '*.json'
- '.github/workflows/pages.yml'
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Restore node modules cache
uses: actions/cache@v4
with:
path: ./node_modules/
key: npm-${{ hashFiles('package.json') }}
-
name: Install dependencies
run: npm install
-
name: Build project
run: npm run build:example
-
name: Setup Pages
uses: actions/configure-pages@v5
-
name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: website
path: ./dist/
if-no-files-found: error
retention-days: 1
deploy:
needs: build
runs-on: ubuntu-latest
if: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
steps:
-
name: Checkout artifacts
uses: actions/download-artifact@v4
with:
name: website
path: ./dist/
-
name: Upload to Github Pages
uses: actions/upload-pages-artifact@v3
with:
path: ./dist/
-
name: Publish
uses: actions/deploy-pages@v4