Skip to content

Commit 50e3024

Browse files
esolitosgitbutler-client
authored andcommitted
feat: Simplify Vespa documentation feed workflow
1 parent be7c2ff commit 50e3024

File tree

1 file changed

+2
-73
lines changed

1 file changed

+2
-73
lines changed

Diff for: .github/workflows/feed.yml

+2-73
Original file line numberDiff line numberDiff line change
@@ -1,80 +1,9 @@
11
name: Vespa Documentation Search Feed
2+
23
on:
34
push:
45
branches: [ master ]
56

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 }}
11-
127
jobs:
138
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
9+
uses: vespa-engine/gh-actions/.github/workflows/jekyll-feed-to-vespa.yml@main

0 commit comments

Comments
 (0)