File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Publish Docs
2+ on :
3+ push :
4+ branches :
5+ - main # Change this to master if your default branch is master
6+ permissions :
7+ contents : write
8+ jobs :
9+ deploy :
10+ runs-on : ubuntu-latest
11+ steps :
12+ - uses : actions/checkout@v4
13+ - name : Configure Git Credentials
14+ run : |
15+ git config user.name github-actions[bot]
16+ git config user.email 41898282+github-actions[bot]@users.noreply.github.com
17+ - uses : actions/setup-python@v5
18+ with :
19+ python-version : 3.x
20+ - run : echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
21+ - uses : actions/cache@v4
22+ with :
23+ key : mkdocs-material-${{ env.cache_id }}
24+ path : .cache
25+ restore-keys : |
26+ mkdocs-material-
27+ - name : Install Dependencies
28+ run : |
29+ pip install mkdocs-material
30+ pip install pymdown-extensions # Add any other plugins you used for math rendering here
31+ - name : Deploy Docs
32+ run : mkdocs gh-deploy --force
33+
34+ **Step 3: Push and Configure**
35+ 1. Commit and push this `.github` folder to your repository.
36+ 2. The Action will automatically run (you can watch it in the **Actions** tab on GitHub).
37+ 3. Once it finishes, go to **Settings** > **Pages**.
38+ 4. Set the **Source** to **Deploy from a branch** and select the `gh-pages` branch as your source.
39+
40+ Your documentation is now live and will automatically update whenever you push new changes to your markdown files!
You can’t perform that action at this time.
0 commit comments