mirror of
https://github.com/bunkerity/bunkerized-nginx
synced 2023-12-13 21:30:18 +01:00
41 lines
1.1 KiB
YAML
41 lines
1.1 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@v3
|
|
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@v4
|
|
with:
|
|
python-version: '3.10'
|
|
- name: Install doc requirements
|
|
run: pip install -r docs/requirements.txt
|
|
- name: Push doc
|
|
run: mike deploy --update-aliases --push ${{ inputs.VERSION }} ${{ inputs.ALIAS }}
|
|
- name: Set default doc
|
|
if: inputs.ALIAS == 'latest'
|
|
run: mike set-default --push latest
|