feat: added cli example to project #7
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
# Source: https://github.com/squidfunk/mkdocs-material/blob/master/docs/publishing-your-site.md | |
name: gh-pages-deploy | |
on: | |
push: | |
branches: [main, master] | |
pull_request: | |
branches: [main, master] | |
permissions: | |
contents: write | |
pages: write | |
id-token: write | |
jobs: | |
deploy: | |
name: Python ${{ matrix.python-version }} on ${{ startsWith(matrix.os, 'macos-') && 'macOS' || startsWith(matrix.os, 'windows-') && 'Windows' || 'Linux' }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
python-version: ['3.12'] | |
steps: | |
- name: Checkout source code | |
uses: actions/checkout@v4 | |
with: | |
repository: ${{ github.repository }} | |
token: ${{ github.token }} | |
- name: Configure Git Credentials | |
run: | | |
git config user.name github-actions[bot] | |
git config user.email 41898282+github-actions[bot]@users.noreply.github.com | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
# Store the `cache_id` environmental variable to access it later during cache | |
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV | |
- uses: actions/cache@v4 | |
with: | |
key: mkdocs-material-${{ env.cache_id }} | |
path: .cache | |
restore-keys: | | |
mkdocs-material- | |
- run: pip install mkdocs mkdocs-material pymdown-extensions mkdocs-nav-weight | |
- run: mkdocs gh-deploy --force |