Skip to content

Commit

Permalink
Update static.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
EliHei2 authored Sep 11, 2024
1 parent 01fd4ee commit b1fe62f
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
name: Deploy MkDocs to GitHub Pages

on:
# Runs on pushes targeting the default branch
push:
branches: ["main"] # Change "main" to your default branch if necessary

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: false
Expand All @@ -34,22 +31,27 @@ jobs:
with:
python-version: '3.x'

# Step 3: Install dependencies including MkDocs, themes, and plugins
# Step 3: Install your package from the repository
- name: Install package
run: |
pip install .
# Step 4: Install MkDocs and dependencies
- name: Install dependencies
run: |
pip install mkdocs mkdocs-material mkdocs-autorefs mkdocstrings[python] mkdocs-jupyter pymdown-extensions termynal mkdocs-minify-plugin # Add all necessary plugins
pip install mkdocs mkdocs-material mkdocs-autorefs mkdocstrings[python] mkdocs-jupyter pymdown-extensions termynal mkdocs-minify-plugin
# Step 4: Build the MkDocs site
# Step 5: Build the MkDocs site
- name: Build MkDocs site
run: mkdocs build --verbose

# Step 5: Upload the generated site directory as an artifact for GitHub Pages
# Step 6: Upload the generated site directory as an artifact for GitHub Pages
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: './site' # Only upload the generated `site` folder

# Step 6: Deploy to GitHub Pages
# Step 7: Deploy to GitHub Pages
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

0 comments on commit b1fe62f

Please sign in to comment.