Skip to content

chore(deps): update actions/configure-pages action to v5 (#81) #101

chore(deps): update actions/configure-pages action to v5 (#81)

chore(deps): update actions/configure-pages action to v5 (#81) #101

Workflow file for this run

name: CI
on:
push:
branches:
- main
tags:
- v**
pull_request:
branches:
- main
workflow_dispatch:
jobs:
lint:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GitHub_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
- name: Install deps
run: |
echo "public-hoist-pattern[]=@types*" >> .npmrc
pnpm install
- name: Lint
run: |
pnpm lint:check
build:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GitHub_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
- name: Install deps
run: |
pnpm install
- name: Build Packages
run: |
pnpm build
- name: Upload build result
uses: actions/upload-artifact@v4
with:
name: build-result
path: |
**/dist/
!**/node_modules
docs:
runs-on: ubuntu-latest
needs:
- build
env:
GITHUB_TOKEN: ${{ secrets.GitHub_TOKEN }}
permissions:
contents: read
pages: write
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Restore Build Result
uses: actions/download-artifact@v4
with:
name: build-result
- name: Setup pnpm
uses: pnpm/action-setup@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Install deps
run: |
pnpm install
- name: Build Documentation
run: pnpm docs:build
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: docs/src/.vitepress/dist
- name: Deploy to GitHub Pages
if: github.event_name == 'push'
id: deployment
uses: actions/deploy-pages@v4
publish:
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref_type == 'tag' && startsWith(github.ref, 'refs/tags/v')
needs:
- build
env:
GITHUB_TOKEN: ${{ secrets.GitHub_TOKEN }}
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
permissions:
contents: write
issues: write
pull-requests: write
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Restore Build Result
uses: actions/download-artifact@v4
with:
name: build-result
- name: Setup pnpm
uses: pnpm/action-setup@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://registry.npmjs.org/
cache: pnpm
- name: Release
run: |
pnpm -r publish --no-git-checks
pnpx changelogithub
env:
NPM_CONFIG_PROVENANCE: true
publish-pr:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
needs:
- build
env:
GITHUB_TOKEN: ${{ secrets.GitHub_TOKEN }}
permissions:
contents: write
issues: write
pull-requests: write
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Restore Build Result
uses: actions/download-artifact@v4
with:
name: build-result
- name: Setup pnpm
uses: pnpm/action-setup@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
- name: Run pkg-pr-new publish
run: pnpx pkg-pr-new publish --compact --no-template --pnpm './packages/*'