Skip to content

Commit 7b79a43

Browse files
authoredMay 31, 2024
fix: always use latest openapi from npm (#1039)
1 parent 9bb7d31 commit 7b79a43

File tree

9 files changed

+59
-40
lines changed

9 files changed

+59
-40
lines changed
 

‎.github/workflows/docs.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
branches:
66
- master
7+
workflow_dispatch:
78

89
jobs:
910
build:
@@ -30,6 +31,7 @@ jobs:
3031
- name: Build docs
3132
run: |
3233
npm ci --force
34+
npm update @apify/openapi
3335
npm run build
3436
env:
3537
APIFY_SIGNING_TOKEN: ${{ secrets.APIFY_SIGNING_TOKEN }}

‎.github/workflows/lychee.yml

+29-28
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,36 @@
11
name: Lychee Link Checker
22

3-
on: [pull_request]
3+
on: [ pull_request ]
44

55
jobs:
6-
link-check:
7-
runs-on: ubuntu-latest
8-
steps:
9-
- uses: actions/checkout@v4
6+
link-check:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v4
1010

11-
- name: Use Node.js 20
12-
uses: actions/setup-node@v4
13-
with:
14-
node-version: 20
15-
cache: 'npm'
16-
cache-dependency-path: 'package-lock.json'
17-
always-auth: 'true'
18-
registry-url: 'https://npm.pkg.github.com/'
19-
scope: '@apify-packages'
11+
- name: Use Node.js 20
12+
uses: actions/setup-node@v4
13+
with:
14+
node-version: 20
15+
cache: 'npm'
16+
cache-dependency-path: 'package-lock.json'
17+
always-auth: 'true'
18+
registry-url: 'https://npm.pkg.github.com/'
19+
scope: '@apify-packages'
2020

21-
- name: Build docs
22-
run: |
23-
npm ci --force
24-
npm run build
25-
env:
26-
APIFY_SIGNING_TOKEN: ${{ secrets.APIFY_SIGNING_TOKEN }}
27-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
28-
SMARTLOOK_PROJECT_KEY: ${{ secrets.SMARTLOOK_PROJECT_KEY }}
21+
- name: Build docs
22+
run: |
23+
npm ci --force
24+
npm update @apify/openapi
25+
npm run build
26+
env:
27+
APIFY_SIGNING_TOKEN: ${{ secrets.APIFY_SIGNING_TOKEN }}
28+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
29+
SMARTLOOK_PROJECT_KEY: ${{ secrets.SMARTLOOK_PROJECT_KEY }}
2930

30-
- uses: lycheeverse/lychee-action@v1.10.0
31-
env:
32-
GITHUB_TOKEN: ${{ secrets.APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN }}
33-
with:
34-
fail: true
35-
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'
31+
- uses: lycheeverse/lychee-action@v1.10.0
32+
env:
33+
GITHUB_TOKEN: ${{ secrets.APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN }}
34+
with:
35+
fail: true
36+
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'

‎.lycheeignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ https:\/\/www\.youtube.*
33
\.(jpg|jpeg|png|gif|bmp|webp|svg)$
44
https:\/\/github\.com\/apify\/apify-docs\/edit\/[^ ]*a
55
https:\/\/docs\.apify\.com\/assets\/[^ ]*
6-
https:\/\/docs\.apify\.com\/api\/v2-new.*
6+
https:\/\/api\.apify\.com/.*
7+
https:\/\/github\.com\/my-github-account\/actor-repo
78
file:\/\/\/.*
89
https://chrome\.google\.com/webstore/.*
910
https?:\/\/(www\.)?npmjs\.com\/.*

‎.redocly.yaml

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
extends:
2+
- recommended
3+
4+
rules:
5+
no-unused-components: error
6+
7+
theme:
8+
openapi:
9+
requiredPropsFirst: true
10+
noAutoAuth: true
11+
hideDownloadButton: true
12+
onlyRequiredInSamples: true
13+
nativeScrollbars: true
14+
scrollYOffset: 68
15+
theme:
16+
colors:
17+
primary:
18+
main: '#1f9ec8'

‎docusaurus.config.js

+1
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ module.exports = {
8080
'redocusaurus',
8181
/** @type {import('redocusaurus').PresetEntry} */
8282
{
83+
config: join(__dirname, '.redocly.yaml'),
8384
specs: [
8485
{
8586
spec: 'node_modules/@apify/openapi/openapi.yaml',

‎package-lock.json

+5-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
"dependencies": {
6060
"@apify-packages/ui-library": "^0.12.0",
6161
"@apify/docsearch-apify-docs": "3.5.3",
62-
"@apify/openapi": "^0.0.3",
62+
"@apify/openapi": "^0.0.7",
6363
"@docusaurus/core": "^2.4.1",
6464
"@docusaurus/plugin-client-redirects": "^2.4.1",
6565
"@docusaurus/preset-classic": "^2.4.1",

‎sources/platform/api_v2/api_v2_reference.apib

+1-1
Original file line numberDiff line numberDiff line change
@@ -3529,7 +3529,7 @@ This section describes API endpoints to manage webhooks.
35293529
Webhooks provide an easy and reliable way to configure the Apify platform
35303530
to carry out an action (e.g. a HTTP request to another service) when a certain system event occurs.
35313531
For example, you can use webhooks to start another actor when an actor run finishes or fails.
3532-
For more information see <a href="https://docs.apify.com/platform/webhooks">Webhooks documentation</a>.
3532+
For more information see <a href="https://docs.apify.com/platform/integrations/webhooks">Webhooks documentation</a>.
35333533

35343534
## Webhook collection [/v2/webhooks{?token,limit,offset,desc}]
35353535

‎src/theme/DocItem/Layout/index.js

-4
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,7 @@ function useDocTOC() {
3939
}
4040

4141
function shouldShowGiscus(rxStrings, pathname) {
42-
console.log(rxStrings);
4342
return rxStrings.some((rxs) => {
44-
console.log('blasbkjfdlfms');
45-
console.log('regex', rxs);
46-
console.log('pathname', pathname);
4743
const pathRegExp = new RegExp(rxs);
4844
const isForbidden = pathRegExp.test(pathname);
4945
return !isForbidden;

0 commit comments

Comments
 (0)
Please sign in to comment.