Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
2a9dd5a
chore(deps): update dependency markdownlint-cli to ^0.43.0 (#1301)
renovate[bot] Nov 25, 2024
d1ee201
try to fix CI and remove index page with a redirect
B4nan Nov 22, 2024
e8a4d83
try to fix CI 2
B4nan Nov 22, 2024
5a975f8
try to fix CI 3
B4nan Nov 25, 2024
ad810e5
try to fix CI
B4nan Nov 25, 2024
9003fa9
try to fix CI 5
B4nan Nov 25, 2024
d0e6aa4
try to fix CI 6
B4nan Nov 25, 2024
2a1a417
try to fix CI 7
B4nan Nov 25, 2024
2c013bc
try to fix CI 8
B4nan Nov 25, 2024
c19b53b
add openapi specs directly into the repository
B4nan Nov 25, 2024
2f02203
fix some linters
B4nan Nov 25, 2024
c21737b
fix more linters
B4nan Nov 25, 2024
88437f4
fix more linters?
B4nan Nov 25, 2024
3b74741
fix more linters
B4nan Nov 25, 2024
25fff4f
remove index page for the API
B4nan Nov 26, 2024
f17bca4
keep warnings for openapi spec errors
B4nan Nov 26, 2024
92226f8
feat: use `@docusaurus/faster` and `openapi-docs` canary
barjin Nov 26, 2024
db62597
use intro page on the `/v2-new` URL directly
B4nan Nov 26, 2024
a80497e
disable redirect
B4nan Nov 26, 2024
bf985de
Merge branch 'master' into new-api-docs
B4nan Nov 26, 2024
666581f
polish workflows
B4nan Nov 26, 2024
079d975
try to fix vale workflow
B4nan Nov 26, 2024
7496139
try to fix vale workflow 2
B4nan Nov 26, 2024
56e8192
try to fix vale workflow 3
B4nan Nov 26, 2024
647b74d
add badges to sidebar
B4nan Nov 27, 2024
e32b996
disable sidebar collapsing
B4nan Nov 27, 2024
c4ebaa2
fix main heading size
B4nan Nov 28, 2024
51287e8
rename top level `openapi` folder
B4nan Nov 28, 2024
db266b9
use inlined specs for redocusaurus
B4nan Nov 28, 2024
1679612
use redocusaurus on raw specs so we dont run decorators twice
B4nan Nov 28, 2024
a75b84b
use redocusaurus on raw specs so we dont run decorators twice
B4nan Nov 28, 2024
1564534
ignore openapi readmes in vale
B4nan Nov 28, 2024
64fe8f8
rebuild api docs on `npm start`
B4nan Nov 28, 2024
613e287
handle sidebar scrolling on state transitions
B4nan Nov 28, 2024
f0a43a6
handle sidebar scrolling on state transitions
B4nan Nov 28, 2024
6259df1
redirects for original URLs starting with `#reference/...`
B4nan Nov 28, 2024
5fa2cfa
deprecation PoC
B4nan Nov 29, 2024
c0df7a8
disallow indexing of `v2-new`
B4nan Nov 29, 2024
17e6018
sync changes from openapi repo and fix blank lines in index page
B4nan Nov 29, 2024
6b965e2
mark a few more deprecations
B4nan Nov 29, 2024
e9088e6
Merge branch 'master' into new-api-docs
B4nan Nov 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 0 additions & 25 deletions .github/workflows/apiary.yaml

This file was deleted.

9 changes: 6 additions & 3 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,23 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: Use Node.js 20
- name: Use Node.js 22
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22
cache: 'npm'
cache-dependency-path: 'package-lock.json'
always-auth: 'true'
registry-url: 'https://npm.pkg.github.com/'
scope: '@apify-packages'

- name: Enable corepack
run: |
corepack enable

- name: Build docs
run: |
npm ci --force
npm update @apify/openapi
npm run build
env:
APIFY_SIGNING_TOKEN: ${{ secrets.APIFY_SIGNING_TOKEN }}
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/lychee.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,23 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Use Node.js 20
- name: Use Node.js 22
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22
cache: 'npm'
cache-dependency-path: 'package-lock.json'
always-auth: 'true'
registry-url: 'https://npm.pkg.github.com/'
scope: '@apify-packages'

- name: Enable corepack
run: |
corepack enable

- name: Build docs
run: |
npm ci --force
npm update @apify/openapi
npm run build
env:
APIFY_SIGNING_TOKEN: ${{ secrets.APIFY_SIGNING_TOKEN }}
Expand Down
43 changes: 43 additions & 0 deletions .github/workflows/openapi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Check OpenAPI specs

on:
push:

#env:
# APIFY_STAGING_TOKEN: ${{ secrets.APIFY_STAGING_TOKEN }}

jobs:
build:
name: Build the specification file
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Use Node.js 22
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'npm'
cache-dependency-path: 'package-lock.json'
registry-url: 'https://npm.pkg.github.com/'
scope: '@apify-packages'

- name: Enable corepack
run: |
corepack enable

- name: Install Dependencies
run: npm ci --force
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- run: |
npm ci
npm run redoc:test

# TODO
# - uses: actions/setup-python@v5
# with:
# python-version: '3.10'
# - run: python -m pip install schemathesis==3.35.0
126 changes: 68 additions & 58 deletions .github/workflows/publish-theme.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,33 @@ on:

jobs:
look_for_change:
if: ${{ !contains(github.event.head_commit.message, '[skip ci]') }}
runs-on: ubuntu-latest
outputs:
theme_changed: ${{ steps.changed-theme-files.outputs.any_changed }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20

- name: Check changes in theme
id: changed-theme-files
uses: tj-actions/changed-files@v45
with:
since_last_remote_commit: "true"
files: |
apify-docs-theme/**
if: ${{ !contains(github.event.head_commit.message, '[skip ci]') }}
runs-on: ubuntu-latest
outputs:
theme_changed: ${{ steps.changed-theme-files.outputs.any_changed }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Use Node.js 22
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'npm'
cache-dependency-path: 'package-lock.json'

- name: Enable corepack
run: |
corepack enable

- name: Check changes in theme
id: changed-theme-files
uses: tj-actions/changed-files@v45
with:
since_last_remote_commit: "true"
files: |
apify-docs-theme/**

publish:
needs: look_for_change
Expand All @@ -39,14 +45,18 @@ jobs:
with:
token: ${{ secrets.APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN }}

- name: Use Node.js 20
- name: Use Node.js 22
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22
cache: 'npm'
cache-dependency-path: 'package-lock.json'
always-auth: 'true'

- name: Enable corepack
run: |
corepack enable

- name: Setup git user and npm
run: |
git config --global user.name "Apify Release Bot"
Expand All @@ -70,33 +80,33 @@ jobs:
GIT_USER: "barjin:${{ secrets.APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN }}"
GH_TOKEN: ${{ secrets.APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN }}

- name: Wait until the new theme version is available on npm
run: |
cd $GITHUB_WORKSPACE/apify-docs-theme
PACKAGE_JSON=$(cat package.json);
PACKAGE_NAME=$(jq -r .name <(echo $PACKAGE_JSON));
PACKAGE_VER=$(jq -r .version <(echo $PACKAGE_JSON));
for i in $(seq 1 10); do
EXIT_CODE=0;
npm show $PACKAGE_NAME@$PACKAGE_VER || EXIT_CODE=1;
if [[ $EXIT_CODE -eq 1 ]]; then
echo "The new package version ($PACKAGE_VER) is not yet available, waiting 30 seconds...";
sleep 30;
continue;
fi;
echo "The new package version ($PACKAGE_VER) is live, proceeding!";
break;
done;
npm show $PACKAGE_NAME@$PACKAGE_VER # fails if the package is not available, succeeds if it is

- name: Commit the new theme version
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: 'chore: publish new version of @apify/docs-theme [skip ci]'
file_pattern: 'apify-docs-theme/package*.json'
commit_user_name: Apify Bot
commit_user_email: [email protected]
commit_author: Apify Bot <[email protected]>
- name: Wait until the new theme version is available on npm
run: |
cd $GITHUB_WORKSPACE/apify-docs-theme
PACKAGE_JSON=$(cat package.json);
PACKAGE_NAME=$(jq -r .name <(echo $PACKAGE_JSON));
PACKAGE_VER=$(jq -r .version <(echo $PACKAGE_JSON));
for i in $(seq 1 10); do
EXIT_CODE=0;
npm show $PACKAGE_NAME@$PACKAGE_VER || EXIT_CODE=1;
if [[ $EXIT_CODE -eq 1 ]]; then
echo "The new package version ($PACKAGE_VER) is not yet available, waiting 30 seconds...";
sleep 30;
continue;
fi;
echo "The new package version ($PACKAGE_VER) is live, proceeding!";
break;
done;
npm show $PACKAGE_NAME@$PACKAGE_VER # fails if the package is not available, succeeds if it is

- name: Commit the new theme version
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: 'chore: publish new version of @apify/docs-theme [skip ci]'
file_pattern: 'apify-docs-theme/package*.json'
commit_user_name: Apify Bot
commit_user_email: [email protected]
commit_author: Apify Bot <[email protected]>

rebuild-docs:
needs: publish
Expand All @@ -109,10 +119,10 @@ jobs:

runs-on: ubuntu-latest
steps:
- env:
GITHUB_TOKEN: ${{ secrets.APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN }}
run: |
gh workflow run docs.yaml --repo ${{ matrix.repo }}
- env:
GITHUB_TOKEN: ${{ secrets.APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN }}
run: |
gh workflow run docs.yaml --repo ${{ matrix.repo }}

rebuild-python-docs:
needs: publish
Expand All @@ -124,7 +134,7 @@ jobs:

runs-on: ubuntu-latest
steps:
- env:
GITHUB_TOKEN: ${{ secrets.APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN }}
run: |
gh workflow run build_and_deploy_docs.yaml --repo ${{ matrix.repo }}
- env:
GITHUB_TOKEN: ${{ secrets.APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN }}
run: |
gh workflow run build_and_deploy_docs.yaml --repo ${{ matrix.repo }}
Loading
Loading