diff --git a/.github/workflows/pr-previews.yaml b/.github/workflows/pr-previews.yaml deleted file mode 100644 index 6deca05aa2..0000000000 --- a/.github/workflows/pr-previews.yaml +++ /dev/null @@ -1,32 +0,0 @@ -name: Docs PR Previews - -on: - pull_request: - types: [opened, synchronize, reopened, closed] - -concurrency: - cancel-in-progress: false - group: 'docs-pr-previews-${{ github.event.pull_request.number }}' - -jobs: - trigger-preview: - if: github.event.action != 'closed' - - runs-on: ubuntu-latest - - steps: - - name: Trigger preview - run: gh workflow run apify_docs_pr.yml --repo apify/apify-docs-private --field pr-number=${{ github.event.pull_request.number }} --field original-repository=${{ github.repository }} - env: - GH_TOKEN: ${{ secrets.APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN }} - - delete-preview: - if: github.event.action == 'closed' - - runs-on: ubuntu-latest - - steps: - - name: Delete preview - run: gh workflow run apify_docs_pr.yml --repo apify/apify-docs-private --field pr-number=${{ github.event.pull_request.number }} --field original-repository=${{ github.repository }} --field action=delete - env: - GH_TOKEN: ${{ secrets.APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN }} diff --git a/apify-docs-theme/src/config.js b/apify-docs-theme/src/config.js index 4195006c20..434532a582 100644 --- a/apify-docs-theme/src/config.js +++ b/apify-docs-theme/src/config.js @@ -1,16 +1,12 @@ /* eslint-disable global-require */ +// eslint-disable-next-line no-nested-ternary +const absoluteUrl = process.env.LOCALHOST + ? 'http://localhost:3000' + : process.env.DEV + ? 'http://docs.apify.loc' + : 'https://docs.apify.com'; -let absoluteUrl = 'https://docs.apify.com'; - -if (process.env.LOCALHOST) { - absoluteUrl = 'http://localhost:3000'; -} else if (process.env.DEV) { - absoluteUrl = 'http://docs.apify.loc'; -} else if (process.env.APIFY_DOCS_ABSOLUTE_URL) { - absoluteUrl = process.env.APIFY_DOCS_ABSOLUTE_URL; -} - -const themeConfig = { +const themeConfig = ({ docs: { versionPersistence: 'localStorage', sidebar: { @@ -281,7 +277,7 @@ const themeConfig = { async: true, defer: true, }, -}; +}); const plugins = [ [ @@ -298,9 +294,7 @@ const plugins = [ return { resolveLoader: { alias: { - 'roa-loader': require.resolve( - `${__dirname}/roa-loader/`, - ), + 'roa-loader': require.resolve(`${__dirname}/roa-loader/`), }, }, }; diff --git a/docusaurus.config.js b/docusaurus.config.js index b97358d283..a304898573 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -249,7 +249,7 @@ module.exports = { module: { rules: [ { - test: /examples\//i, + test: /apify-docs\/examples\//i, type: 'asset/source', }, ], diff --git a/examples/ts-parallel-scraping/orchestrator/src/main.ts b/examples/ts-parallel-scraping/orchestrator/src/main.ts index 6c9d2c287e..117b8172ba 100644 --- a/examples/ts-parallel-scraping/orchestrator/src/main.ts +++ b/examples/ts-parallel-scraping/orchestrator/src/main.ts @@ -59,7 +59,7 @@ if (state.isInitialized) { state.isInitialized = true; } -const parallelRunPromises = state.parallelRunIds.map(async (runId) => { +const parallelRunPromises = state.parallelRunIds.map((runId) => { const runClient = apifyClient.run(runId); return runClient.waitForFinish(); });