Skip to content

Commit 3deace3

Browse files
esolitosgitbutler-client
authored andcommitted
feat: Simplify Vespa documentation feed workflow
1 parent 304ae1d commit 3deace3

File tree

1 file changed

+12
-74
lines changed

1 file changed

+12
-74
lines changed

.github/workflows/feed.yml

+12-74
Original file line numberDiff line numberDiff line change
@@ -1,80 +1,18 @@
11
name: Vespa Documentation Search Feed
2+
23
on:
34
push:
4-
branches: [ master ]
5-
6-
env:
7-
DATA_PLANE_PUBLIC_KEY : ${{ secrets.VESPA_TEAM_DATA_PLANE_PUBLIC_CERT }}
8-
DATA_PLANE_PRIVATE_KEY : ${{ secrets.VESPA_TEAM_DATA_PLANE_PRIVATE_KEY }}
9-
VESPA_CLI_DATA_PLANE_CERT : ${{ secrets.VESPA_TEAM_VESPA_CLI_DATA_PLANE_CERT }}
10-
VESPA_CLI_DATA_PLANE_KEY : ${{ secrets.VESPA_TEAM_VESPA_CLI_DATA_PLANE_KEY }}
5+
branches:
6+
- main
7+
- update-vespa-documentation-search-feed-workflow # Temporary branch for testing
118

129
jobs:
1310
build:
14-
runs-on: ubuntu-latest
15-
steps:
16-
17-
- uses: actions/checkout@v4
18-
19-
- uses: ruby/setup-ruby@v1
20-
with:
21-
ruby-version: 3.1
22-
bundler-cache: false
23-
24-
- name: Build site
25-
run: |
26-
bundle install
27-
bundle exec jekyll build -p _plugins-vespafeed
28-
29-
- name: Setup Python
30-
uses: actions/setup-python@v5
31-
with:
32-
python-version: '3.x'
33-
34-
- name: Install dependencies
35-
run: |
36-
pip3 install PyYAML mmh3 requests html5lib beautifulsoup4 markdownify tiktoken
37-
38-
- name: Install Vespa CLI
39-
uses: vespa-engine/setup-vespa-cli-action@v1
40-
41-
- name: Feed docs site
42-
run: |
43-
# The python scripts below uses the Vespa CLI for feeding / data access.
44-
# See https://docs.vespa.ai/en/vespa-cli.html.
45-
# The environment variables below have credentials for endpoint access -
46-
# use the key/cert files in .vespa and paste their content into GitHub Secrets.
47-
# VESPA_CLI_API_KEY must be set and empty as below.
48-
export VESPA_CLI_DATA_PLANE_CERT
49-
export VESPA_CLI_DATA_PLANE_KEY
50-
export VESPA_CLI_API_KEY=
51-
./feed_to_vespa.py _config.yml
52-
53-
- name: Feed paragraphs site
54-
run: |
55-
export VESPA_CLI_DATA_PLANE_CERT
56-
export VESPA_CLI_DATA_PLANE_KEY
57-
export VESPA_CLI_API_KEY=
58-
./feed-split.py open_index.json https://docs.vespa.ai questions.jsonl
59-
./feed_to_vespa.py _paragraphs_config.yml
60-
61-
- name: Feed suggestions
62-
run: |
63-
export VESPA_CLI_DATA_PLANE_CERT
64-
export VESPA_CLI_DATA_PLANE_KEY
65-
export VESPA_CLI_API_KEY=
66-
./feed_to_vespa.py _suggestions_config.yml
67-
68-
69-
- name: Generate and feed reference suggestions
70-
run: |
71-
./generate_suggestions_from_reference.py en/reference/schema-reference.html https://docs.vespa.ai/ open-p > suggestions.jsonl
72-
./generate_suggestions_from_reference.py en/reference/services-admin.html https://docs.vespa.ai/ open-p >> suggestions.jsonl
73-
./generate_suggestions_from_reference.py en/reference/services-container.html https://docs.vespa.ai/ open-p >> suggestions.jsonl
74-
./generate_suggestions_from_reference.py en/reference/services-docproc.html https://docs.vespa.ai/ open-p >> suggestions.jsonl
75-
./generate_suggestions_from_reference.py en/reference/services-processing.html https://docs.vespa.ai/ open-p >> suggestions.jsonl
76-
./generate_suggestions_from_reference.py en/reference/services-search.html https://docs.vespa.ai/ open-p >> suggestions.jsonl
77-
./generate_suggestions_from_reference.py en/reference/services-http.html https://docs.vespa.ai/ open-p >> suggestions.jsonl
78-
./generate_suggestions_from_reference.py en/reference/services-content.html https://docs.vespa.ai/ open-p >> suggestions.jsonl
79-
./convert.py suggestions.jsonl suggestions_reference_index.json
80-
./feed_to_vespa.py _suggestions_reference_config.yml
11+
uses: vespa-engine/gh-actions/.github/workflows/jekyll-feed-to-vespa.yml@fix-jekyll-build
12+
with:
13+
hook-post-build-script: |
14+
echo "Find all JSON files"
15+
find . -type f -name '*.json'
16+
echo "\n"
17+
echo "Find the open_index.json file"
18+
find . -type f -name '*open_index*'

0 commit comments

Comments
 (0)