diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index 19d531fe5..147311187 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -11,21 +11,31 @@ jobs: name: Deploy to GitHub Pages runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: pnpm/action-setup@v2 + - name: Checkout + uses: actions/checkout@v6 with: - version: 9.14.2 + persist-credentials: false + - uses: pnpm/action-setup@v6 + with: + cache: true + package_json_file: site/package.json + cache_dependency_path: site/pnpm-lock.yaml - uses: actions/setup-node@v4 with: - node-version: 20. - cache: 'pnpm' - cache-dependency-path: site/pnpm-lock.yaml + node-version: 24 - name: Build website working-directory: site run: | pnpm install --frozen-lockfile pnpm run build + + - name: Commit changes + id: extract_repo_name + run: | + # Extract only the repo name from 'owner/repo-name' + echo "repo_name=$(echo "${{ github.repository }}" | cut -d'/' -f2)" >> "$GITHUB_OUTPUT" + # Popular action to deploy to GitHub Pages: # Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus - name: Deploy to GitHub Pages @@ -34,5 +44,5 @@ jobs: github_token: ${{ secrets.GITHUB_TOKEN }} # Build output to publish to the `gh-pages` branch: publish_dir: ./docs - user_name: Mikkel Schmidt - user_email: mikkel.schmidt@gmail.com + user_name: ${{ steps.extract_repo_name.outputs.repo_name }} + user_email: actions@github.com diff --git a/site/package.json b/site/package.json index c7e753af7..0b35bd01c 100644 --- a/site/package.json +++ b/site/package.json @@ -69,5 +69,6 @@ "last 1 firefox version", "last 1 safari version" ] - } + }, + "packageManager": "pnpm@11.2.2+sha512.36e6621fad506178936455e70247b8808ef4ec25797a9f437a93281a020484e2607f6a469a22e982987c3dbb8866e3071514ab10a4a1749e06edcd1ec118436f" } diff --git a/site/pnpm-workspace.yaml b/site/pnpm-workspace.yaml new file mode 100644 index 000000000..3fb53d11f --- /dev/null +++ b/site/pnpm-workspace.yaml @@ -0,0 +1,6 @@ +allowBuilds: + '@swc/core': true + '@tsparticles/engine': true + core-js: true + core-js-pure: true + sharp: true