From 5cf7fdd1c495a0cf61b9a2b92490118e8cb0e6c2 Mon Sep 17 00:00:00 2001 From: Ryan Yin Date: Mon, 16 Jun 2025 23:35:52 +0800 Subject: [PATCH] fix: puppeteer - pass NO_SANDBOX in github workflow, exit when failed --- .github/workflows/release-pdf.yml | 4 +++- docs/.vitepress/vitepress-pdf.config.ts | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release-pdf.yml b/.github/workflows/release-pdf.yml index 6ff0bd4..60c828d 100644 --- a/.github/workflows/release-pdf.yml +++ b/.github/workflows/release-pdf.yml @@ -19,9 +19,11 @@ jobs: access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} - name: Show nixpkgs version run: nix-instantiate --eval -E '(import {}).lib.version' - - name: Run a command with nix develop + - name: Generate PDF run: | nix develop .#export-pdf --ignore-environment --command bash -c ' + set -e + export NO_SANDBOX=true pnpm install pnpm export-pdf ' diff --git a/docs/.vitepress/vitepress-pdf.config.ts b/docs/.vitepress/vitepress-pdf.config.ts index a5f1623..4097a30 100644 --- a/docs/.vitepress/vitepress-pdf.config.ts +++ b/docs/.vitepress/vitepress-pdf.config.ts @@ -28,8 +28,8 @@ const footerTemplate = `