Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
2a8604c
feat: new docusarus implementation (apify-docs-v2 repo merge)
B4nan Feb 20, 2023
d7f73f5
build: use GA actions for deployment
B4nan Feb 20, 2023
2563cea
chore: make footer apify logo a link
B4nan Feb 21, 2023
88addcf
docs: fix link in anti scraping guide
B4nan Feb 21, 2023
11d90ec
chore: remove original content and conversion script
B4nan Feb 21, 2023
17f0d78
build: fail the build on broken links
B4nan Feb 21, 2023
173b8af
docs: fix another broken link
B4nan Feb 21, 2023
c5675d8
chore: add linter setup based on old repository + implement fixes
B4nan Feb 21, 2023
8d8c37f
chore: fix prettier setup
B4nan Feb 21, 2023
36e51d7
chore: keep python examples in root
B4nan Feb 21, 2023
ef534b6
build: update actions/setup-node
B4nan Feb 21, 2023
79609e2
ci: add apiary upload workflow
B4nan Feb 21, 2023
232fce0
ci: try to run test workflow in parallel
B4nan Feb 21, 2023
7697fcb
docs: update readme and add contributing guide
B4nan Feb 21, 2023
03b24bc
chore: change repo name in docusaurus config
B4nan Feb 21, 2023
84c59ee
chore: add meta options to package.json
B4nan Feb 21, 2023
b58b96d
chore: update lockfile
B4nan Feb 21, 2023
d63468b
chore: update contributing guide
B4nan Feb 21, 2023
c269aab
chore: backport https://github.com/apify/apify-docs-v2/commit/95db803…
B4nan Feb 27, 2023
10b6178
chore: backport https://github.com/apify/apify-docs-v2/commit/354a024…
B4nan Feb 27, 2023
fa3c41e
chore: backport content changes + more broken link fixes
B4nan Feb 27, 2023
e3f57b2
chore: remove not used webp image clones
B4nan Feb 27, 2023
d015391
chore: remove more webp image clones, prefer source
B4nan Feb 27, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 0 additions & 5 deletions .babelrc

This file was deleted.

1 change: 0 additions & 1 deletion .lintignore → .eslintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
node_modules
build
docs/.eslintrc.js
32 changes: 18 additions & 14 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,28 @@
{
"extends": [
"plugin:markdown/recommended",
"@apify"
],
"parser": "@babel/eslint-parser",
"plugins": [
"@babel"
"@apify/eslint-config-ts",
"plugin:react/recommended",
"plugin:react-hooks/recommended"
],
"parserOptions": {
"configFile": ".babelrc"
"files": ["*.js", "*.jsx", "*.ts", "*.tsx"],
"project": "./tsconfig.eslint.json",
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 2020
},
"env": {
"es6": true,
"node": true
"browser": true
},
"settings": {
"react": {
"version": "detect"
}
},
"root": true,
"rules": {
"import/no-extraneous-dependencies": "off",
"no-unused-vars": "off",
"no-unused-expressions": "off",
"no-undef": "off",
"no-console": "off"
"quote-props": ["error", "consistent"],
"react/prop-types": ["off"]
}
}
25 changes: 25 additions & 0 deletions .github/workflows/apiary.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: apiary.io

on:
push:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Use Node.js 16
uses: actions/setup-node@v3
with:
node-version: 16

- name: Install apiaryio
run: sudo gem install apiaryio

- name: Upload API docs to Apiary.io
run: ./tools/upload_to_apiary.sh
env:
APIARY_API_KEY: ${{ secrets.APIARY_API_KEY }}
34 changes: 0 additions & 34 deletions .github/workflows/build.yml

This file was deleted.

14 changes: 14 additions & 0 deletions .github/workflows/check-pr-title.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Check PR title

on:
pull_request_target:
types: [ opened, edited, synchronize ]

jobs:
check_pr_title:
name: 'Check PR title'
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v5.0.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
17 changes: 0 additions & 17 deletions .github/workflows/close.yml

This file was deleted.

39 changes: 39 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: docs

on:
push:
branches:
- master

jobs:
build:
environment:
name: github-pages
permissions:
contents: write
pages: write
id-token: write
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Use Node.js 16
uses: actions/setup-node@v3
with:
node-version: 16

- name: Build docs
run: |
npm ci --force
npm run build

- name: Set up GitHub Pages
uses: actions/configure-pages@v3

- name: Upload GitHub Pages artifact
uses: actions/upload-pages-artifact@v1
with:
path: ./build

- name: Deploy artifact to GitHub Pages
uses: actions/deploy-pages@v1
20 changes: 0 additions & 20 deletions .github/workflows/lint.yml

This file was deleted.

118 changes: 118 additions & 0 deletions .github/workflows/publish-theme.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
name: publish-theme

on:
push:
branches:
- master

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@v3
with:
fetch-depth: 0

- name: Use Node.js 16
uses: actions/setup-node@v3
with:
node-version: 16

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

publish:
needs: look_for_change
if: needs.look_for_change.outputs.theme_changed == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.GH_TOKEN }}

- name: Use Node.js 16
uses: actions/setup-node@v3
with:
node-version: 16

- name: Setup git user and npm
run: |
git config --global user.name "Apify Release Bot"
git config --global user.email "noreply@apify.com"

cd $GITHUB_WORKSPACE/apify-docs-theme
echo "access=public" > .npmrc
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" >> .npmrc

- name: Bump the theme version
run: |
cd $GITHUB_WORKSPACE/apify-docs-theme
npm version patch

- name: Deploy theme to npm
run: |
cd $GITHUB_WORKSPACE/apify-docs-theme
npx -y publish-if-not-exists
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GIT_USER: "barjin:${{ secrets.GH_TOKEN }}"
GH_TOKEN: ${{ secrets.GH_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@v4
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: my-github-actions-bot@example.org
commit_author: Apify Bot <apify@apify.com>

rebuild-docs:
needs: publish
strategy:
matrix:
include:
- repo: 'apify/apify-sdk-js'
branch: 'master'
- repo: 'apify/apify-sdk-python'
branch: 'docs-v2'
- repo: 'apify/apify-cli'
branch: 'master'
- repo: 'apify/apify-client-js'
branch: 'master'
- repo: 'apify/apify-client-python'
branch: 'docs-v2'

runs-on: ubuntu-latest
steps:
- env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
run: |
gh workflow run docs.yml --repo ${{ matrix.repo }} --ref ${{ matrix.branch }}
65 changes: 65 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Test

on:
push:
branches: [ master, renovate/** ]
pull_request:
branches: [ master ]

jobs:
build:
name: Docs build
runs-on: ubuntu-latest
steps:
- name: Checkout Source code
uses: actions/checkout@v3

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

- name: Install Dependencies
run: npm ci --force

- run: npm run build

lint_content:
name: Lint markdown content
runs-on: ubuntu-latest
steps:
- name: Checkout Source code
uses: actions/checkout@v3

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

- name: Install Dependencies
run: npm ci --force

- run: npm run lint:md

lint_code:
name: Lint app code
runs-on: ubuntu-latest
steps:
- name: Checkout Source code
uses: actions/checkout@v3

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

- name: Install Dependencies
run: npm ci --force

- run: npm run lint:code
Loading