📖 Deploy docs 9b12dc2d958b6e24f31b1d95a433d9dd7bf46e69 #437
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
name: 📖 Deploy docs | |
run-name: 📖 Deploy docs ${{ github.sha }} | |
on: | |
push: | |
paths: | |
- 'manual/**' | |
branches: | |
- master | |
- maintenance-release | |
- manticore-* | |
env: | |
DOCS_AUTOCOMMIT_TITLE: Docs_examples_update | |
jobs: | |
commit_info: | |
name: Commit info | |
runs-on: ubuntu-22.04 | |
steps: | |
- run: | | |
echo "# Docs deployment for commit ${{ github.sha }}" >> $GITHUB_STEP_SUMMARY | |
echo "* Commit URL: [${{ github.sha }}](/${{ github.repository }}/commit/${{ github.sha }})" >> $GITHUB_STEP_SUMMARY | |
echo "* Initiated by: [@${{ github.actor }}](https://github.com/${{ github.actor }})" >> $GITHUB_STEP_SUMMARY | |
echo "* Ref: ${{ github.ref_type }} \"${{ github.ref_name }}\"" >> $GITHUB_STEP_SUMMARY | |
echo "* Attempt: ${{ github.run_attempt }}" >> $GITHUB_STEP_SUMMARY | |
docs_autocommit_check: | |
name: Check for doc deployment autocommits | |
runs-on: ubuntu-22.04 | |
outputs: | |
res: ${{ steps.check.outputs.res }} | |
steps: | |
- id: check | |
if: ${{ github.event.head_commit.message != env.DOCS_AUTOCOMMIT_TITLE }} | |
run: echo "res=ok" >> $GITHUB_OUTPUT | |
docs_deploy: | |
name: Manticore Manual doc deployment | |
runs-on: ubuntu-22.04 | |
needs: docs_autocommit_check | |
if: needs.docs_autocommit_check.outputs.res == 'ok' | |
defaults: | |
run: | |
shell: bash | |
# timeout-minutes: 30 | |
container: | |
image: manticoresearch/docs_autodeploy:latest | |
env: | |
CACHEB: "../cache" | |
DOCKER_HOST: tcp://docker:2375/ | |
DOCKER_DRIVER: overlay2 | |
RELEASE_FILENAME: latest_release_version | |
COMMIT_DIR: manual | |
DEPLOY_SOURCE: github | |
DEPLOY_TARGET: k8s | |
DOCS_ERRORS_DIR: build/docs/ | |
DOCS_AUTOCOMMIT_TITLE: ${{ env.DOCS_AUTOCOMMIT_TITLE }} | |
DOCS_EXAMPLES_FILEPATH: 'build/test/examples.txt' | |
CI_PROJECT_TITLE: dev | |
CI_PROJECT_PATH: manticoresoftware/manticoresearch | |
CI_PROJECT_DIR: /__w/manticoresearch/manticoresearch | |
CI_COMMIT_SHA: ${{ github.sha }} | |
CI_COMMIT_BRANCH: ${{ github.ref_name }} | |
CI_COMMIT_TITLE: ${{ github.event.head_commit.message }} | |
steps: | |
- name: Install git | |
run: | | |
add-apt-repository ppa:git-core/ppa | |
apt update | |
apt install -y git | |
- name: Checkout | |
uses: actions/[email protected] | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
set-safe-directory: true | |
fetch-depth: 0 | |
- name: Initialization | |
# without adding the safe.directory the script fails to do git show ... | |
run: git config --global --add safe.directory /__w/manticoresearch/manticoresearch | |
- name: Deploy | |
run: | | |
sh /Deploy/autoupdate.sh $DEPLOY_TARGET $COMMIT_DIR $DOCS_ERRORS_DIR | |
- name: Upload artifact | |
uses: manticoresoftware/upload_artifact_with_retries@v3 | |
with: | |
name: Docs error artifact | |
path: $DOCS_ERRORS_DIR |