Skip to content

Commit 42da5eb

Browse files
authored
Merge branch 'main' into bump-meilisearch-v1.3.0
2 parents f8b45a8 + 84517d6 commit 42da5eb

5 files changed

Lines changed: 320 additions & 255 deletions

File tree

Lines changed: 40 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,41 @@
11
name: Documentation
2+
23
on:
34
push:
45
tags:
56
- v*
7+
# Allows to run the workflow manually
8+
workflow_dispatch:
9+
10+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
11+
permissions:
12+
contents: read
13+
pages: write
14+
id-token: write
15+
16+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
17+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
18+
concurrency:
19+
group: "pages"
20+
cancel-in-progress: false
21+
22+
env:
23+
CUSTOM_DOMAIN: python-sdk.meilisearch.com
624

725
jobs:
8-
docs:
26+
build:
927
runs-on: ubuntu-latest
1028
steps:
1129
- uses: actions/checkout@v3
1230
with:
1331
fetch-depth: 0
1432
lfs: true
33+
- name: Setup Github Pages
34+
uses: actions/configure-pages@v3
1535
- name: Install Python
1636
uses: actions/setup-python@v4
1737
with:
18-
python-version: '3.10'
38+
python-version: "3.10"
1939
- name: Install pipenv
2040
run: |
2141
pip install pipx
@@ -29,9 +49,22 @@ jobs:
2949
run: |
3050
pipenv run sphinx-apidoc -f -o docs meilisearch/
3151
pipenv run sphinx-build docs ./docs/_build/html/
32-
- name: Deploy
33-
uses: peaceiris/actions-gh-pages@v3
52+
# CNAME file is required for GitHub pages custom domain
53+
- name: Create CNAME file
54+
run: |
55+
echo "$CUSTOM_DOMAIN" > ./docs/_build/html/CNAME
56+
echo "Created CNAME in ./docs/_build/html/: $CUSTOM_DOMAIN"
57+
- name: Upload artifacts
58+
uses: actions/upload-pages-artifact@v2
3459
with:
35-
github_token: ${{ secrets.GITHUB_TOKEN }}
36-
publish_dir: docs/_build/html
37-
force_orphan: true
60+
path: "./docs/_build/html"
61+
deploy:
62+
needs: build
63+
environment:
64+
name: github-pages
65+
url: ${{ steps.deployment.outputs.page_url }}
66+
runs-on: ubuntu-latest
67+
steps:
68+
- name: Deploy to GitHub Pages
69+
id: deployment
70+
uses: actions/deploy-pages@v2

Pipfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ types-requests = "*"
1515
black = "*"
1616
isort = "*"
1717
importlib_metadata = {version = "*", markers="python_version < '3.8'"}
18-
zipp = {version = "==3.15.0", markers="python_version < '3.8'"}
18+
zipp = {version = "==3.16.2", markers="python_version < '3.8'"}
1919
exceptiongroup = {version = "*", markers="python_version < '3.11'"}
2020
tomli = {version = "*", markers="python_version < '3.11'"}
2121
wrapt = {version = "*", markers="python_version < '3.11'"}

0 commit comments

Comments
 (0)