diff --git a/.github/workflows/test-e2e.yml b/.github/workflows/test-e2e.yml index 291583b6456f..216abc392c6f 100644 --- a/.github/workflows/test-e2e.yml +++ b/.github/workflows/test-e2e.yml @@ -53,11 +53,15 @@ jobs: restore-keys: | turbo-${{ github.job }}-${{ github.ref_name }}- - - name: Login to Apify - run: npx -y apify-cli@beta login -t ${{ secrets.APIFY_SCRAPER_TESTS_API_TOKEN }} + + - name: Setup Apify CLI + uses: apify/setup-apify-cli-action@main + with: + version: 'beta' + token: ${{ secrets.APIFY_SCRAPER_TESTS_API_TOKEN }} - name: Add Apify secrets for E2E tests - run: npx -y apify-cli@beta secrets add anthropicApiKey ${{ secrets.ANTHROPIC_API_KEY }} + run: apify secrets add anthropicApiKey ${{ secrets.ANTHROPIC_API_KEY }} - name: Install Dependencies run: yarn diff --git a/test/e2e/tools.mjs b/test/e2e/tools.mjs index 2835e9c280ec..9e2aadfe41d4 100644 --- a/test/e2e/tools.mjs +++ b/test/e2e/tools.mjs @@ -71,7 +71,7 @@ export function getActorTestDir(url) { export async function pushActor(client, dirName) { await copyPackages(dirName); try { - execSync('npx -y apify-cli@beta push', { + execSync('apify push', { cwd: dirName, env: { ...process.env, GIT_CEILING_DIRECTORIES: dirname(dirName) }, }); diff --git a/website/patches/@signalwire+docusaurus-plugin-llms-txt+1.2.2.patch b/website/patches/@signalwire+docusaurus-plugin-llms-txt+1.2.2.patch new file mode 100644 index 000000000000..c39ee9ed58c9 --- /dev/null +++ b/website/patches/@signalwire+docusaurus-plugin-llms-txt+1.2.2.patch @@ -0,0 +1,13 @@ +diff --git a/node_modules/@signalwire/docusaurus-plugin-llms-txt/lib/transformation/plugins/plugin-registry.js b/node_modules/@signalwire/docusaurus-plugin-llms-txt/lib/transformation/plugins/plugin-registry.js +index f35c2df..4d8b9bd 100644 +--- a/node_modules/@signalwire/docusaurus-plugin-llms-txt/lib/transformation/plugins/plugin-registry.js ++++ b/node_modules/@signalwire/docusaurus-plugin-llms-txt/lib/transformation/plugins/plugin-registry.js +@@ -73,7 +73,7 @@ export class PluginRegistry { + } + // Always last - converts HTML AST to Markdown AST + processor.use(rehypeRemark, { +- handlers: { br: () => ({ type: 'html', value: '
' }) }, ++ handlers: { br: () => ({ type: 'break' }) }, + }); + } + /** diff --git a/website/roa-loader/index.js b/website/roa-loader/index.js index d4826ad55431..fc883a4651ba 100644 --- a/website/roa-loader/index.js +++ b/website/roa-loader/index.js @@ -3,11 +3,13 @@ const { inspect } = require('node:util'); const { urlToRequest } = require('loader-utils'); +const SIGNING_TOKEN = process.env.APIFY_SIGNING_TOKEN; const signingUrl = new URL('https://api.apify.com/v2/tools/encode-and-sign'); -signingUrl.searchParams.set('token', process.env.APIFY_SIGNING_TOKEN); +signingUrl.searchParams.set('token', SIGNING_TOKEN || ''); const queue = []; const cache = {}; let working = false; +let warnedAboutMissingToken = false; function hash(source) { return createHash('sha1').update(source).digest('hex'); @@ -89,6 +91,15 @@ module.exports = async function (code) { return { code, hash: 'fast' }; } + // Skip signing if token is not configured + if (!SIGNING_TOKEN) { + if (!warnedAboutMissingToken) { + console.warn('APIFY_SIGNING_TOKEN is not set, skipping code signing for runnable examples.'); + warnedAboutMissingToken = true; + } + return { code, hash: 'unsigned' }; + } + console.log(`Signing ${urlToRequest(this.resourcePath)}...`, { working, queue: queue.length }); const codeHash = await encodeAndSign(code); return { code, hash: codeHash }; diff --git a/website/src/theme/DocItem/Content/index.js b/website/src/theme/DocItem/Content/index.js index d870c463545a..b93c5df528fd 100644 --- a/website/src/theme/DocItem/Content/index.js +++ b/website/src/theme/DocItem/Content/index.js @@ -1,3 +1,4 @@ +import BrowserOnly from '@docusaurus/BrowserOnly'; import { useDoc } from '@docusaurus/plugin-content-docs/client'; import { ThemeClassNames } from '@docusaurus/theme-common'; import LLMButtons from '@site/src/components/LLMButtons'; @@ -27,7 +28,7 @@ export default function DocItemContent({ children }) { {syntheticTitle && (
{syntheticTitle && {syntheticTitle}} - + {() => }
)} {children}