Skip to content

chore(deps): bump actions/upload-pages-artifact from 2 to 3 #92

chore(deps): bump actions/upload-pages-artifact from 2 to 3

chore(deps): bump actions/upload-pages-artifact from 2 to 3 #92

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@v3
-
name: Restore node modules cache
uses: actions/cache@v3
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@v3
-
name: Upload artifacts
uses: actions/upload-artifact@v3
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@v3
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@v2