mirror of
https://github.com/bunkerity/bunkerweb
synced 2026-05-24 09:28:37 +00:00
41 lines
1.2 KiB
YAML
41 lines
1.2 KiB
YAML
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@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
|
|
with:
|
|
fetch-depth: 0
|
|
token: ${{ secrets.BUNKERBOT_TOKEN }}
|
|
- name: Replace VERSION
|
|
if: inputs.VERSION == 'testing'
|
|
run: ./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@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4.7.1
|
|
with:
|
|
python-version: "3.10"
|
|
- name: Install doc requirements
|
|
run: pip install --no-cache-dir --require-hashes -r docs/requirements.txt
|
|
- name: Push doc
|
|
run: mike deploy --update-aliases --push --no-redirect ${{ inputs.VERSION }} ${{ inputs.ALIAS }}
|
|
- name: Set default doc
|
|
if: inputs.ALIAS == 'latest'
|
|
run: mike set-default --push latest
|