diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index adcb018439..53a0cd1306 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -4,6 +4,7 @@ on: push: branches: - master + workflow_dispatch: jobs: build: @@ -30,6 +31,7 @@ jobs: - name: Build docs run: | npm ci --force + npm update @apify/openapi npm run build env: APIFY_SIGNING_TOKEN: ${{ secrets.APIFY_SIGNING_TOKEN }} diff --git a/.github/workflows/lychee.yml b/.github/workflows/lychee.yml index 711c6bfbc5..e5d2192a07 100644 --- a/.github/workflows/lychee.yml +++ b/.github/workflows/lychee.yml @@ -1,35 +1,36 @@ name: Lychee Link Checker -on: [pull_request] +on: [ pull_request ] jobs: - link-check: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 + link-check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 - - name: Use Node.js 20 - uses: actions/setup-node@v4 - with: - node-version: 20 - cache: 'npm' - cache-dependency-path: 'package-lock.json' - always-auth: 'true' - registry-url: 'https://npm.pkg.github.com/' - scope: '@apify-packages' + - name: Use Node.js 20 + uses: actions/setup-node@v4 + with: + node-version: 20 + cache: 'npm' + cache-dependency-path: 'package-lock.json' + always-auth: 'true' + registry-url: 'https://npm.pkg.github.com/' + scope: '@apify-packages' - - name: Build docs - run: | - npm ci --force - npm run build - env: - APIFY_SIGNING_TOKEN: ${{ secrets.APIFY_SIGNING_TOKEN }} - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - SMARTLOOK_PROJECT_KEY: ${{ secrets.SMARTLOOK_PROJECT_KEY }} + - name: Build docs + run: | + npm ci --force + npm update @apify/openapi + npm run build + env: + APIFY_SIGNING_TOKEN: ${{ secrets.APIFY_SIGNING_TOKEN }} + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + SMARTLOOK_PROJECT_KEY: ${{ secrets.SMARTLOOK_PROJECT_KEY }} - - uses: lycheeverse/lychee-action@v1.10.0 - env: - GITHUB_TOKEN: ${{ secrets.APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN }} - with: - fail: true - args: --base https://docs.apify.com --exclude-path 'build/versions.html' --max-retries 6 --verbose --no-progress --accept '100..=103,200..=299,403..=403, 429' './build/**/*.html' + - uses: lycheeverse/lychee-action@v1.10.0 + env: + GITHUB_TOKEN: ${{ secrets.APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN }} + with: + fail: true + args: --base https://docs.apify.com --exclude-path 'build/versions.html' --max-retries 6 --verbose --no-progress --accept '100..=103,200..=299,403..=403, 429' './build/**/*.html' diff --git a/.lycheeignore b/.lycheeignore index 5d08a513fd..232df66e7d 100644 --- a/.lycheeignore +++ b/.lycheeignore @@ -3,7 +3,8 @@ https:\/\/www\.youtube.* \.(jpg|jpeg|png|gif|bmp|webp|svg)$ https:\/\/github\.com\/apify\/apify-docs\/edit\/[^ ]*a https:\/\/docs\.apify\.com\/assets\/[^ ]* -https:\/\/docs\.apify\.com\/api\/v2-new.* +https:\/\/api\.apify\.com/.* +https:\/\/github\.com\/my-github-account\/actor-repo file:\/\/\/.* https://chrome\.google\.com/webstore/.* https?:\/\/(www\.)?npmjs\.com\/.* diff --git a/.redocly.yaml b/.redocly.yaml new file mode 100644 index 0000000000..e919c83102 --- /dev/null +++ b/.redocly.yaml @@ -0,0 +1,18 @@ +extends: + - recommended + +rules: + no-unused-components: error + +theme: + openapi: + requiredPropsFirst: true + noAutoAuth: true + hideDownloadButton: true + onlyRequiredInSamples: true + nativeScrollbars: true + scrollYOffset: 68 + theme: + colors: + primary: + main: '#1f9ec8' diff --git a/docusaurus.config.js b/docusaurus.config.js index ee4df9ef72..65e5562f70 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -80,6 +80,7 @@ module.exports = { 'redocusaurus', /** @type {import('redocusaurus').PresetEntry} */ { + config: join(__dirname, '.redocly.yaml'), specs: [ { spec: 'node_modules/@apify/openapi/openapi.yaml', diff --git a/package-lock.json b/package-lock.json index ed76e14d5c..7ccd9c8e84 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,7 +15,7 @@ "dependencies": { "@apify-packages/ui-library": "^0.12.0", "@apify/docsearch-apify-docs": "3.5.3", - "@apify/openapi": "^0.0.3", + "@apify/openapi": "^0.0.7", "@docusaurus/core": "^2.4.1", "@docusaurus/plugin-client-redirects": "^2.4.1", "@docusaurus/preset-classic": "^2.4.1", @@ -65,7 +65,7 @@ }, "apify-docs-theme": { "name": "@apify/docs-theme", - "version": "1.0.118", + "version": "1.0.120", "license": "ISC", "dependencies": { "@apify/docs-search-modal": "^1.0.25", @@ -705,9 +705,9 @@ } }, "node_modules/@apify/openapi": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/@apify/openapi/-/openapi-0.0.3.tgz", - "integrity": "sha512-z1dSZFwaUH4yBfxXIJ5ZvsjtiHwt1H/Wu7zivo3meZ9py1HI33L+zl9vED3E920AnWUxEaU3UihS7I32aAX3RQ==", + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/@apify/openapi/-/openapi-0.0.7.tgz", + "integrity": "sha512-zOtyfJWqjW/sqG61LnLklgWPRh9oGW1LgF+6FRW5SfPKaxJywMPRCPZja7rV/oUYEm9AB8y1E0/vO/qDzgAa6A==", "dependencies": { "@redocly/openapi-cli": "^1.0.0-beta.95" } diff --git a/package.json b/package.json index e39dd7bcc9..2a4c18fc8b 100644 --- a/package.json +++ b/package.json @@ -59,7 +59,7 @@ "dependencies": { "@apify-packages/ui-library": "^0.12.0", "@apify/docsearch-apify-docs": "3.5.3", - "@apify/openapi": "^0.0.3", + "@apify/openapi": "^0.0.7", "@docusaurus/core": "^2.4.1", "@docusaurus/plugin-client-redirects": "^2.4.1", "@docusaurus/preset-classic": "^2.4.1", diff --git a/sources/platform/api_v2/api_v2_reference.apib b/sources/platform/api_v2/api_v2_reference.apib index adc896c1ae..09088c4f06 100644 --- a/sources/platform/api_v2/api_v2_reference.apib +++ b/sources/platform/api_v2/api_v2_reference.apib @@ -3529,7 +3529,7 @@ This section describes API endpoints to manage webhooks. Webhooks provide an easy and reliable way to configure the Apify platform to carry out an action (e.g. a HTTP request to another service) when a certain system event occurs. For example, you can use webhooks to start another actor when an actor run finishes or fails. -For more information see Webhooks documentation. +For more information see Webhooks documentation. ## Webhook collection [/v2/webhooks{?token,limit,offset,desc}] diff --git a/src/theme/DocItem/Layout/index.js b/src/theme/DocItem/Layout/index.js index 8962f078e7..a944746d59 100644 --- a/src/theme/DocItem/Layout/index.js +++ b/src/theme/DocItem/Layout/index.js @@ -39,11 +39,7 @@ function useDocTOC() { } function shouldShowGiscus(rxStrings, pathname) { - console.log(rxStrings); return rxStrings.some((rxs) => { - console.log('blasbkjfdlfms'); - console.log('regex', rxs); - console.log('pathname', pathname); const pathRegExp = new RegExp(rxs); const isForbidden = pathRegExp.test(pathname); return !isForbidden;