Skip to content

chore: migrate from yarn v1 to pnpm and update GitHub Actions (#155) #64

chore: migrate from yarn v1 to pnpm and update GitHub Actions (#155)

chore: migrate from yarn v1 to pnpm and update GitHub Actions (#155) #64

Workflow file for this run

name: website
on:
push:
branches:
- master
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false
- name: Install pnpm
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
- name: Setup Node.js
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
with:
node-version: 22
- name: Set Env
run: |
echo "CURRENT_VERSION=$(node -p 'require("./package.json").version')" >> $GITHUB_ENV
- name: Install
run: pnpm install
- name: Build
run: |
pnpm install
pnpm run website -- --metadataVersion="${CURRENT_VERSION}"
env:
CURRENT_VERSION: ${{ env.CURRENT_VERSION }}
working-directory: example/
- name: Deploy
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./example/dist