ci: fix docs build

This commit is contained in:
alina 🌸 2024-04-14 04:49:44 +03:00
parent 943b13088f
commit 3580575b82
Signed by: teidesu
SSH key fingerprint: SHA256:uNeCpw6aTSU4aIObXLvHfLkDa82HWH9EiOj9AXOIRpI
2 changed files with 27 additions and 22 deletions

View file

@ -26,6 +26,8 @@ jobs:
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Build
env:
BUILD_FOR_DOCS: 1
run: pnpm run -r --workspace-concurrency=1 build
- name: Build docs
run: |

View file

@ -7,8 +7,9 @@ const { Readable } = require('stream')
const git = require('../../scripts/git-utils')
const GITHUB_TOKEN = process.env.GITHUB_TOKEN
const SKIP_PREBUILT = process.env.BUILD_FOR_DOCS === '1'
if (!GITHUB_TOKEN) {
if (!GITHUB_TOKEN && !SKIP_PREBUILT) {
throw new Error('GITHUB_TOKEN is required to publish crypto-node')
}
@ -151,6 +152,7 @@ module.exports = ({ fs, glob, path, packageDir, outDir }) => ({
async final() {
const libDir = path.join(packageDir, 'lib')
if (!SKIP_PREBUILT) {
// generate sources hash
const hashes = []
@ -175,6 +177,7 @@ module.exports = ({ fs, glob, path, packageDir, outDir }) => ({
console.log('[i] Extracting artifacts')
await extractArtifacts(artifacts)
}
// copy native sources and binding.gyp file