From b1fe62fb360c7cda4e086d0d840fefce8aad04e9 Mon Sep 17 00:00:00 2001 From: Elyas Heidari <55977725+EliHei2@users.noreply.github.com> Date: Wed, 11 Sep 2024 17:55:17 +0200 Subject: [PATCH] Update static.yml --- .github/workflows/static.yml | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index 0dd4207..5bd3844 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -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 @@ -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