Merge pull request #218 from solrudev/develop #23
This file contains hidden or 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
| name: publish-docs | |
| on: | |
| push: | |
| branches: | |
| - master | |
| permissions: | |
| contents: read | |
| jobs: | |
| build-docs: | |
| name: Build documentation | |
| runs-on: ubuntu-latest | |
| if: github.repository == 'solrudev/Ackpine' | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # 6.0.2 | |
| with: | |
| persist-credentials: false | |
| fetch-depth: 0 | |
| - name: Setup environment | |
| uses: ./.github/actions/setup-gradle-environment-action | |
| with: | |
| gradle-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }} | |
| - name: Set up Python | |
| uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # 6.2.0 | |
| with: | |
| python-version: 3.14.3 | |
| - name: Prepare API docs | |
| run: | | |
| ./gradlew :api-documentation:dokkaGenerate | |
| - name: Build Zensical | |
| run: | | |
| pip3 install --upgrade pip && pip3 install -r requirements.txt | |
| zensical build | |
| - name: Archive docs artifact | |
| run: | | |
| echo ::group::Archive artifact | |
| tar \ | |
| --dereference --hard-dereference \ | |
| --directory site \ | |
| -cvf "$RUNNER_TEMP/artifact.tar" \ | |
| --exclude=.git \ | |
| --exclude=.github \ | |
| --exclude=".[^/]*" \ | |
| . | |
| echo ::endgroup:: | |
| - name: Upload docs artifact | |
| uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # 7.0.0 | |
| with: | |
| name: github-pages | |
| path: ${{ runner.temp }}/artifact.tar | |
| retention-days: 1 | |
| if-no-files-found: error | |
| deploy-docs: | |
| name: Publish documentation | |
| needs: [ build-docs ] | |
| runs-on: ubuntu-latest | |
| permissions: | |
| pages: write | |
| id-token: write | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Deploy docs | |
| id: deployment | |
| uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # 5.0.0 |