Skip to content

Commit

Permalink
.github/workflows/updatesearch: Search service index updating
Browse files Browse the repository at this point in the history
  • Loading branch information
rkdarst committed Feb 9, 2024
1 parent 939c49b commit 33cc5cf
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/updatesearch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Update the search database
on:
push:
branches:
- master

jobs:
update-search-index:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.12"]
steps:
- uses: actions/checkout@v4
# https://github.com/actions/setup-python
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install deps
run: |
pip install sphinx sphinx_rtd_theme markdownify beautifulsoup4
pip install -r requirements.txt
- name: Build project
run: |
make dirhtml SPHINXOPTS="-w warnings.txt"
- name: Cat warnings
run: |
cat warnings.txt
- name: Upload new data
env:
SEARCH_UPDATE_AUTHORIZATION: ${{ secrets.SEARCH_UPDATE_AUTHORIZATION }}
SEARCH_URL: ${{ secrets.SEARCH_URL }}
run: |
python _meta/search.py --db=search.db update "$SEARCH_URL"

0 comments on commit 33cc5cf

Please sign in to comment.