mirror of
https://github.com/ryan4yin/nixos-and-flakes-book.git
synced 2025-06-21 12:31:42 +02:00
fix: puppeteer - pass NO_SANDBOX in github workflow, exit when failed
This commit is contained in:
parent
7adc16bf1d
commit
5cf7fdd1c4
4
.github/workflows/release-pdf.yml
vendored
4
.github/workflows/release-pdf.yml
vendored
@ -19,9 +19,11 @@ jobs:
|
||||
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Show nixpkgs version
|
||||
run: nix-instantiate --eval -E '(import <nixpkgs> {}).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
|
||||
'
|
||||
|
@ -28,8 +28,8 @@ const footerTemplate = `<div style="margin-bottom: -0.4cm; height: 70%; width: 1
|
||||
export default defineUserConfig({
|
||||
urlOrigin: "https://nixos-and-flakes.thiscute.world/",
|
||||
|
||||
// When process.env.CI is true (in GitHub Actions), disable sandboxing
|
||||
...(process.env.CI
|
||||
// When NO_SANDBOX is true, disable sandboxing
|
||||
...(process.env.NO_SANDBOX === "true"
|
||||
? {
|
||||
puppeteerLaunchOptions: {
|
||||
args: ["--no-sandbox", "--disable-setuid-sandbox"],
|
||||
|
Loading…
x
Reference in New Issue
Block a user