-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #28 from flexn-io/release
update main with release
- Loading branch information
Showing
4 changed files
with
93 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Vercel Prod Deployment | ||
|
||
on: | ||
push: | ||
branches: | ||
- release | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
environment: vercel-deployments | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: '18.x' | ||
- name: Set scraper config environment variable | ||
id: scraper_config | ||
run: | | ||
export SCRAPER_CONFIG=$(cat ./config.prod.json | jq -r tostring) | ||
echo "scraper_config=${SCRAPER_CONFIG}" >> $GITHUB_OUTPUT | ||
- name: Install Vercel CLI | ||
run: npm install --global vercel@latest | ||
- run: rm -rf .vercel | ||
- name: Pull Vercel Environment Information | ||
run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }} | ||
- name: Build Project Artifacts | ||
run: BASE_URL=https://renative.org ALGOLIA_INDEX=renative_docsearch vercel build | ||
- name: Deploy Project Artifacts to Vercel | ||
run: | | ||
url="$(vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }})" | ||
vercel alias --token=${{ secrets.VERCEL_TOKEN }} --scope=${{ secrets.VERCEL_ORG_ID }} set "$url" renative.org | ||
- name: Update Algolia index | ||
uses: addnab/docker-run-action@v3 | ||
with: | ||
image: algolia/docsearch-scraper | ||
run: | | ||
CONFIG='${{ steps.scraper_config.outputs.scraper_config }}' APPLICATION_ID=${{ secrets.ALGOLIA_APPLICATION_ID }} API_KEY=${{ secrets.ALGOLIA_API_KEY }} pipenv run python -m src.index |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
{ | ||
"index_name": "renative_docsearch", | ||
"sitemap_urls": ["https://renative.org/sitemap.xml"], | ||
"selectors": { | ||
"lvl0": { | ||
"selector": "header h1, article h1", | ||
"global": true, | ||
"default_value": "Documentation" | ||
}, | ||
"lvl1": "article h2", | ||
"lvl2": "article h3", | ||
"lvl3": "article h4", | ||
"lvl4": "article h5, article td:first-child", | ||
"lvl5": "article h6", | ||
"content": "article p, article li, article td:last-child" | ||
}, | ||
"strip_chars": " .,;:#", | ||
"custom_settings": { | ||
"searchableAttributes": [ | ||
"unordered(hierarchy.lvl0)", | ||
"unordered(hierarchy_radio.lvl0)", | ||
"unordered(hierarchy_camel.lvl0)", | ||
"unordered(hierarchy_radio_camel.lvl0)", | ||
"unordered(hierarchy.lvl1)", | ||
"unordered(hierarchy_radio.lvl1)", | ||
"unordered(hierarchy_camel.lvl1)", | ||
"unordered(hierarchy_radio_camel.lvl1)", | ||
"unordered(hierarchy.lvl2)", | ||
"unordered(hierarchy_radio.lvl2)", | ||
"unordered(hierarchy_camel.lvl2)", | ||
"unordered(hierarchy_radio_camel.lvl2)", | ||
"unordered(hierarchy.lvl3)", | ||
"unordered(hierarchy_radio.lvl3)", | ||
"unordered(hierarchy_camel.lvl3)", | ||
"unordered(hierarchy_radio_camel.lvl3)", | ||
"unordered(hierarchy.lvl4)", | ||
"unordered(hierarchy_radio.lvl4)", | ||
"unordered(hierarchy_camel.lvl4)", | ||
"unordered(hierarchy_radio_camel.lvl4)", | ||
"unordered(hierarchy.lvl5)", | ||
"unordered(hierarchy_radio.lvl5)", | ||
"unordered(hierarchy_camel.lvl5)", | ||
"unordered(hierarchy_radio_camel.lvl5)", | ||
"unordered(content)", | ||
"unordered(anchor)" | ||
], | ||
"attributesToRetrieve": ["hierarchy", "content", "anchor", "url", "url_without_anchor", "type"], | ||
"ranking": ["words", "filters", "typo", "exact", "attribute", "proximity"] | ||
} | ||
} |