Skip to content

Commit d76e990

Browse files
authored
Merge pull request #106 from apache/merge-to-prod
Blog post and change from buildbot to github actions
2 parents 738deea + 4c265b4 commit d76e990

File tree

7 files changed

+450
-13
lines changed

7 files changed

+450
-13
lines changed

.asf.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,9 @@ github:
1414
protected_branches:
1515
main
1616
production
17+
18+
notifications:
19+
jobs: janhoy@apache.org
20+
issues: janhoy@apache.org
21+
pullrequests: janhoy@apache.org
22+
jira_options: link label worklog

.github/workflows/build-pelican.yml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Build Solr website with ASF Pelican action
2+
3+
on:
4+
push:
5+
branches: [ "main", "production" ]
6+
paths-ignore:
7+
- 'README.md'
8+
- 'LICENSE'
9+
- 'build.sh'
10+
- '.editorconfig'
11+
- '.gitignore'
12+
- '.gitattributes'
13+
workflow_dispatch:
14+
15+
jobs:
16+
build-pelican:
17+
runs-on: ubuntu-latest
18+
continue-on-error: true
19+
steps:
20+
- name: Checkout code
21+
uses: actions/checkout@v4
22+
with:
23+
ref: ${{ github.ref == 'refs/heads/production' && 'production' || 'main' }}
24+
25+
- name: Build Pelican Site
26+
uses: apache/infrastructure-actions/pelican@main
27+
with:
28+
destination: ${{ github.ref == 'refs/heads/production' && 'asf-site' || 'asf-staging' }}
29+
gfm: 'false'
30+
version: '4.9.1'
+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Build Solr website with ASF Pelican action for PRs
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- '**'
7+
8+
jobs:
9+
build-pelican:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
- name: Set up Python
14+
# This is the version of the action for setting up Python, not the Python version.
15+
uses: actions/setup-python@v5
16+
with:
17+
python-version: '3.x'
18+
- name: Display Python version
19+
run: python -c "import sys; print(sys.version)"
20+
- name: Install Pelican
21+
shell: bash
22+
# Install needs to run in separate shell so stdout is restored
23+
run: |
24+
(
25+
pip3 install pelican==4.9.1 markdown bs4 ezt requests
26+
)
27+
python3 -V
28+
echo "Pelican version:"
29+
pelican --version
30+
# If the site uses Github Flavored Markdown, use this build branch
31+
- name: Generate website from markdown
32+
shell: bash
33+
run: |
34+
python3 -B -m pelican content
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
Title: Hybrid Search with Apache Solr
2+
category: solr/blogposts
3+
summary: This blog shows how to run a hybrid search (keyword-based search + vectors) in Apache Solr with code examples and explanations. Written by Alessandro Benedetti, Director at Sease and Apache Solr Committer and PMC member.
4+
slug: hybrid-search-with-apache-solr
5+
URL: blogposts/hybrid-search-with-apache-solr.html
6+
save_as: blogposts/hybrid-search-with-apache-solr.html
7+
8+
# Hybrid Search with Apache Solr
9+
Contrary to popular misconception, Solr already supports hybrid search (the combination of keyword and vector-based search techniques)!
10+
Hybrid search can be used in retrieval, ranking, and even Solr's commonly-used "Learning to Rank" module. Alessandro Benedetti, Director at Sease and Apache Solr Committer and PMC member, explains more in a recent post, complete with code examples and explanation.
11+
12+
Learn how you can start using hybrid search in your deployments today - the complete post can be read here: [Hybrid Search with Apache Solr](https://sease.io/2023/12/hybrid-search-with-apache-solr.html)

pelicanconf.py

+6-4
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# -*- coding: utf-8 -*- #
33
from __future__ import unicode_literals
44
from datetime import datetime, date
5-
from checksumdir import dirhash
5+
#from checksumdir import dirhash
66

77
AUTHOR = 'Solr Developers'
88
SITENAME = 'Apache Solr'
@@ -20,7 +20,9 @@
2020

2121
# This string will be appended to all unversioned css and js resources to prevent caching surprises on edits.
2222
# The theme's htaccess file also sets a cache-control header with longer lifetime, if the v=XXXX query string is added.
23-
STATIC_RESOURCE_SUFFIX = "?v=%s" % dirhash('themes/solr/static', 'sha1')[-8:]
23+
#STATIC_RESOURCE_SUFFIX = "?v=%s" % dirhash('themes/solr/static', 'sha1')[-8:]
24+
# SOLR-17339: Dynamic hash disabled until we can install custom modules like checksumdir. Bump this manually on changes
25+
STATIC_RESOURCE_SUFFIX = "?v=4dd59757"
2426

2527
PATH = 'content'
2628

@@ -97,14 +99,14 @@
9799
'jinja2content',
98100
'regex_replace',
99101
'age_days_lt',
100-
'vex'
102+
# SOLR-17339: Vex disabled until https://github.com/apache/infrastructure-actions/pull/63 is merged
103+
# 'vex'
101104
# 'md_inline_extension',
102105
]
103106

104107
MARKDOWN = {
105108
'extension_configs': {
106109
'toc': {},
107-
'mdx_include': {},
108110
'markdown.extensions.codehilite': {'css_class': 'codehilite'},
109111
'markdown.extensions.extra': {},
110112
'markdown.extensions.meta': {},

requirements.txt

+8-9
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
1-
pelican~=4.5.4
2-
Markdown~=3.3.3
3-
checksumdir~=1.2.0
1+
pelican~=4.9.1
2+
Markdown~=3.4
3+
#checksumdir~=1.2.0
44

55
# Pelican plugins
6-
mdx-include~=1.4.1
7-
beautifulsoup4~=4.9.3
6+
beautifulsoup4~=4.12.3
87
# Dependencies of the vex plugin
9-
jsonschema~=4.17.3
10-
jsonref~=1.0.1
8+
#jsonschema~=4.22.0
9+
#jsonref~=1.1.0
1110

1211
# Dev tools
13-
invoke~=1.5.0
12+
invoke~=2.2.0
1413
livereload~=2.6.3
1514

1615
# Patch for bug https://github.com/pallets/markupsafe/issues/284
17-
markupsafe~=2.0.1
16+
markupsafe~=2.1.5

0 commit comments

Comments
 (0)