|
14 | 14 | PACKAGE_NAMESPACE: 'ansys_sphinx_theme' |
15 | 15 | DOCUMENTATION_CNAME: 'sphinxdocs.ansys.com' |
16 | 16 | MEILISEARCH_API_KEY: ${{ secrets.MEILISEARCH_API_KEY }} |
| 17 | + MEILISEARCH_PUBLIC_API_KEY: ${{ secrets.MEILISEARCH_PUBLIC_API_KEY }} |
17 | 18 |
|
18 | 19 | concurrency: |
19 | 20 | group: ${{ github.workflow }}-${{ github.ref }} |
|
82 | 83 | fail-fast: false |
83 | 84 | matrix: |
84 | 85 | os: [ubuntu-latest, windows-latest, macos-latest] |
85 | | - python-version: ['3.7', '3.8', '3.9', '3.10', '3.11'] |
| 86 | + python-version: ['3.8', '3.9', '3.10', '3.11'] |
86 | 87 | should-release: |
87 | 88 | - ${{ github.event_name == 'push' && contains(github.ref, 'refs/tags') }} |
88 | 89 | exclude: |
@@ -132,3 +133,48 @@ jobs: |
132 | 133 | uses: ansys/actions/release-github@v4 |
133 | 134 | with: |
134 | 135 | library-name: ${{ env.PACKAGE_NAME }} |
| 136 | + |
| 137 | + doc-index-dev: |
| 138 | + name: "Deploy dev index docs" |
| 139 | + if: github.ref == 'refs/heads/main' |
| 140 | + runs-on: ubuntu-latest |
| 141 | + needs: doc-deploy-development |
| 142 | + steps: |
| 143 | + - name: "Deploy the latest documentation index" |
| 144 | + uses: ansys/actions/doc-deploy-index@v4 |
| 145 | + with: |
| 146 | + cname: ${{ env.DOCUMENTATION_CNAME }}/version/dev |
| 147 | + index-name: "ansys-sphinx-theme-vdev" |
| 148 | + host-url: ${{ vars.MEILISEARCH_HOST_URL }} |
| 149 | + api-key: ${{ env.MEILISEARCH_API_KEY }} |
| 150 | + |
| 151 | + doc-index-stable: |
| 152 | + name: "Deploy stable docs index" |
| 153 | + if: github.event_name == 'push' && contains(github.ref, 'refs/tags') |
| 154 | + runs-on: ubuntu-latest |
| 155 | + needs: doc-deploy-stable |
| 156 | + steps: |
| 157 | + - name: "Install Git and clone project" |
| 158 | + uses: actions/checkout@v3 |
| 159 | + |
| 160 | + - name: "get version of library" |
| 161 | + shell: bash |
| 162 | + run: | |
| 163 | + python -m pip install -e . |
| 164 | +
|
| 165 | + - name: Scrape the stable documentation to PyMeilisearch |
| 166 | + run: | |
| 167 | + VERSION=$(python -c "from ${{ env.PACKAGE_NAMESPACE }} import __version__; print('.'.join(__version__.split('.')[:2]))") |
| 168 | + VERSION_MEILI=$(python -c "from ${{ env.PACKAGE_NAMESPACE }} import __version__; print('-'.join(__version__.split('.')[:2]))") |
| 169 | + echo "Calculated VERSION: $VERSION" |
| 170 | + echo "Calculated VERSION_MEILI: $VERSION_MEILI" |
| 171 | + echo "VERSION=$VERSION" >> $GITHUB_ENV |
| 172 | + echo "VERSION_MEILI=$VERSION_MEILI" >> $GITHUB_ENV |
| 173 | +
|
| 174 | + - name: "Deploy the latest documentation index" |
| 175 | + uses: ansys/actions/doc-deploy-index@v4 |
| 176 | + with: |
| 177 | + cname: ${{ env.DOCUMENTATION_CNAME }}/version/${{ env.VERSION }} |
| 178 | + index-name: ansys-sphinx-theme-v${{ env.VERSION_MEILI }} |
| 179 | + host-url: ${{ vars.MEILISEARCH_HOST_URL }} |
| 180 | + api-key: ${{ env.MEILISEARCH_API_KEY }} |
0 commit comments