description udpate #8
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 MkDocs to GitHub Pages | |
on: | |
push: | |
branches: | |
- main # Change to your main branch if different | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write # To allow write access to the repository | |
pages: write # To allow publishing to GitHub Pages | |
id-token: write # To verify the source of the deployment | |
steps: | |
- name: Check out the repository | |
uses: actions/checkout@v2 | |
- name: Cache Python packages | |
uses: actions/cache@v3 # Updated to the latest version | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} # Unique key based on OS and requirements | |
restore-keys: | | |
${{ runner.os }}-pip- # Restore keys for cache fallback | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.9' # Specify the Python version you need | |
- name: Install dependencies | |
run: | | |
pip install -r requirements.txt # Install dependencies from requirements.txt | |
- name: Build the documentation | |
run: mkdocs build | |
- name: Deploy to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./site # The default output directory for MkDocs |