Update docs.yml #4
This file contains hidden or 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 cetk-cli Documentation | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v3 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.12' | |
| - name: Install MkDocs | |
| run: | | |
| pip install mkdocs-material | |
| pip install mkdocs-autorefs mkdocs-include-markdown-plugin pymdown-extensions mike | |
| - name: Read version from file | |
| run: echo "CETK_CLI_VERSION=$(cat VERSION)" >> $GITHUB_ENV | |
| - name: Fetch gh-pages branch | |
| run: | | |
| git fetch origin gh-pages:gh-pages | |
| - name: Deploy MkDocs to GitHub Pages | |
| run: | | |
| git config --global user.name "github-actions[bot]" | |
| git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
| mike deploy --branch gh-pages $CETK_CLI_VERSION latest --push --rebase | |
| mike set-default --branch gh-pages latest --push |