Merge pull request #29 from microsoft/main #1
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 Documentation | |
on: | |
workflow_dispatch: | |
release: | |
types: [published] | |
push: | |
paths: | |
- "docs/**" | |
- mkdocs.yml | |
branches: | |
- main | |
jobs: | |
deploy: | |
name: Deploy Documentation | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout main | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
persist-credentials: true | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: 3.x | |
- name: Install Dependencies | |
run: | | |
pip install -r docs/requirements.txt | |
- name: Configure Git User | |
# Required by mike for the commit it does to the gh-pages branch | |
run: | | |
git config user.name "ci-docs" | |
git config user.email "[email protected]" | |
- name: Deploy the latest documents from new release | |
if: ${{ github.event_name == 'release' }} | |
run: mike deploy --push --update-aliases "${GITHUB_REF#refs/*/}" latest | |
- name: Deploy the development docs | |
if: ${{ github.event_name != 'release' }} | |
run: mike deploy --push unreleased |