-
-
Notifications
You must be signed in to change notification settings - Fork 176
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
40 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Build and Deploy MkDocs | ||
|
||
on: | ||
push: | ||
branches: | ||
- docstest | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest # Use Ubuntu as the runner environment | ||
|
||
steps: | ||
# Step 1: Checkout the repository | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
# Step 2: Set up Python environment | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.x" # Specify the Python version | ||
|
||
# Step 3: Install MkDocs and dependencies | ||
- name: Install MkDocs | ||
run: | | ||
pip install mkdocs | ||
pip install mkdocs-material # Optional: MkDocs Material theme | ||
# Step 4: Build and Deploy to GitHub Pages | ||
- name: Deploy to GitHub Pages | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./site # Directory to publish (MkDocs builds here by default) | ||
# Optional: Add "cname: www.example.com" if using a custom domain | ||
|
||
# Step 5: Build MkDocs site | ||
- name: Build MkDocs site | ||
run: | | ||
mkdocs build |