name: Push documentation (REUSABLE) on: workflow_call: inputs: VERSION: required: true type: string ALIAS: required: true type: string secrets: BUNKERBOT_TOKEN: required: true jobs: build: runs-on: ubuntu-latest steps: - name: Checkout source code uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: fetch-depth: 0 token: ${{ secrets.BUNKERBOT_TOKEN }} - name: Replace VERSION if: inputs.VERSION == 'testing' run: chmod +x ./misc/update-version.sh && ./misc/update-version.sh testing - name: Setup git user run: | git config --global user.name "BunkerBot" git config --global user.email "bunkerbot@bunkerity.com" - uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 with: python-version: "3.10" - name: Install doc dependencies run: pip install --no-cache-dir --require-hashes -r docs/requirements.txt && sudo apt install -y libcairo2-dev libfreetype6-dev libffi-dev libjpeg-dev libpng-dev libz-dev - name: Push doc run: mike deploy --update-aliases --push --alias-type=copy ${{ inputs.VERSION }} ${{ inputs.ALIAS }} - name: Set default doc if: inputs.ALIAS == 'latest' run: mike set-default --push latest