mirror of
https://github.com/kemko/nomad.git
synced 2026-01-02 00:15:43 +03:00
Tweak algolia scripts
Avoid running algolia job in forks or enterprise private repositories
This commit is contained in:
11
.circleci/config.yml
generated
11
.circleci/config.yml
generated
@@ -1050,15 +1050,18 @@ jobs:
|
||||
- PAGER: cat
|
||||
algolia_index:
|
||||
docker:
|
||||
- image: circleci/buildpack-deps
|
||||
shell: /usr/bin/env bash -euo pipefail -c
|
||||
- image: node:10
|
||||
steps:
|
||||
- checkout
|
||||
- setup_remote_docker
|
||||
- run:
|
||||
command: |
|
||||
if [ "$CIRCLE_REPOSITORY_URL" != "git@github.com:hashicorp/nomad.git" ]; then
|
||||
echo "Not Nomad OSS Repo, not indexing Algolia"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
cd website/
|
||||
npm i
|
||||
npm install
|
||||
node scripts/index_search_content.js
|
||||
name: Push content to Algolia Index
|
||||
test-docker:
|
||||
|
||||
@@ -1,12 +1,15 @@
|
||||
docker:
|
||||
- image: circleci/buildpack-deps
|
||||
shell: /usr/bin/env bash -euo pipefail -c
|
||||
- image: node:10
|
||||
steps:
|
||||
- checkout
|
||||
- setup_remote_docker
|
||||
- run:
|
||||
name: Push content to Algolia Index
|
||||
command: |
|
||||
if [ "$CIRCLE_REPOSITORY_URL" != "git@github.com:hashicorp/nomad.git" ]; then
|
||||
echo "Not Nomad OSS Repo, not indexing Algolia"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
cd website/
|
||||
npm i
|
||||
npm install
|
||||
node scripts/index_search_content.js
|
||||
|
||||
Reference in New Issue
Block a user