fix(example): add .npmrc to enable pnpm hoisting for website-generator #67
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 and Build Root | |
| run: | | |
| pnpm install | |
| pnpm run build | |
| - name: Build Website | |
| 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 |