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: check: uses: ./.github/workflows/check_docs.yml secrets: inherit 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 needs: [check] 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_multi: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' GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} 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 fresh git run: | echo 'APT::Key::Assert-Pubkey-Algo ">=rsa1024";' > /etc/apt/apt.conf.d/99weakkey-warning apt-get update --allow-releaseinfo-change add-apt-repository -y ppa:git-core/ppa apt-get update apt-get install -y git - name: Checkout uses: actions/checkout@v3.5.3 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 if: always() uses: manticoresoftware/upload_artifact_with_retries@v4 with: name: Docs deploy error artifact path: $DOCS_ERRORS_DIR