mirror of
https://github.com/ryan4yin/nixos-and-flakes-book.git
synced 2025-06-21 12:31:42 +02:00
fix: run puppeteer in the GitHub Actions environment
This commit is contained in:
parent
3e3ba3ff5c
commit
7adc16bf1d
1
.github/workflows/release-pdf.yml
vendored
1
.github/workflows/release-pdf.yml
vendored
@ -22,7 +22,6 @@ jobs:
|
||||
- name: Run a command with nix develop
|
||||
run: |
|
||||
nix develop .#export-pdf --ignore-environment --command bash -c '
|
||||
export PUPPETEER_ARGS="--no-sandbox --disable-setuid-sandbox"
|
||||
pnpm install
|
||||
pnpm export-pdf
|
||||
'
|
||||
|
@ -27,6 +27,15 @@ 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
|
||||
? {
|
||||
puppeteerLaunchOptions: {
|
||||
args: ["--no-sandbox", "--disable-setuid-sandbox"],
|
||||
},
|
||||
}
|
||||
: {}),
|
||||
pdfOptions: {
|
||||
format: "A4",
|
||||
printBackground: true,
|
||||
|
Loading…
x
Reference in New Issue
Block a user