From f0ec748f0e38302ac5f668fd5a0528df7299535a Mon Sep 17 00:00:00 2001 From: Samuel Larkin Date: Wed, 23 Oct 2024 14:45:31 -0400 Subject: [PATCH] feat: merging mkdocs with current static pages (#104) --- .github/workflows/ci.yaml | 30 -------------- .github/workflows/doc.yaml | 43 --------------------- .github/workflows/docs.yaml | 38 ++++++++++++++++++ .github/workflows/static.yml | 43 --------------------- .gitignore | 1 + {static => docs}/BeAGoodClusterCitizen.html | 0 docs/requirements.txt | 27 +++++++++++++ mkdocs.yml | 2 + static/index.html | 21 ---------- 9 files changed, 68 insertions(+), 137 deletions(-) delete mode 100644 .github/workflows/ci.yaml delete mode 100644 .github/workflows/doc.yaml create mode 100644 .github/workflows/docs.yaml delete mode 100644 .github/workflows/static.yml rename {static => docs}/BeAGoodClusterCitizen.html (100%) create mode 100644 docs/requirements.txt delete mode 100644 static/index.html diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml deleted file mode 100644 index e34e5b2..0000000 --- a/.github/workflows/ci.yaml +++ /dev/null @@ -1,30 +0,0 @@ -name: ci -on: - push: - branches: - - github-pages - - master - - main -permissions: - contents: write -jobs: - deploy: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Configure Git Credentials - run: | - git config user.name github-actions[bot] - git config user.email 41898282+github-actions[bot]@users.noreply.github.com - - uses: actions/setup-python@v5 - with: - python-version: 3.x - - run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV - - uses: actions/cache@v4 - with: - key: mkdocs-material-${{ env.cache_id }} - path: .cache - restore-keys: | - mkdocs-material- - - run: pip install mkdocs-material - - run: mkdocs gh-deploy --force diff --git a/.github/workflows/doc.yaml b/.github/workflows/doc.yaml deleted file mode 100644 index 4006b00..0000000 --- a/.github/workflows/doc.yaml +++ /dev/null @@ -1,43 +0,0 @@ -# Simple workflow for deploying static content to GitHub Pages -name: Deploy static content to Pages - -on: - # Runs on pushes targeting the default branch - push: - branches: [$default-branch, dev.sl/presentation] - - # 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, skipping runs queued between the run in-progress and latest queued. -# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. -concurrency: - group: "pages" - cancel-in-progress: false - -jobs: - # Single deploy job since we're just deploying - deploy: - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Setup Pages - uses: actions/configure-pages@v5 - - name: Upload artifact - uses: actions/upload-pages-artifact@v3 - with: - # Upload entire repository - path: "." - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v4 diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml new file mode 100644 index 0000000..3093426 --- /dev/null +++ b/.github/workflows/docs.yaml @@ -0,0 +1,38 @@ +# You need to enable github to host your pages. +# github.com > Settings > Pages > Build and deployment: +# > Source > Deploy from a branches +# > Branch > gh-pages / `/root` +name: Deploy docs + +on: + push: + branches: + - master + - main + paths: + - "**.md" + - "mkdocs.yml" + workflow_dispatch: + +permissions: + contents: write + +concurrency: + group: ${{ github.workflow }} + cancel-in-progress: true + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup doc deploy + run: | + git config user.name 'github-actions[bot]' + git config user.email 'github-actions[bot]@users.noreply.github.com' + - name: Deploy docs + uses: mhausenblas/mkdocs-deploy-gh-pages@master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + REQUIREMENTS: docs/requirements.txt diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml deleted file mode 100644 index c9b2d28..0000000 --- a/.github/workflows/static.yml +++ /dev/null @@ -1,43 +0,0 @@ -# Simple workflow for deploying static content to GitHub Pages -name: Deploy static content to Pages - -on: - # Runs on pushes targeting the default branch - push: - branches: ["master"] - - # 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, skipping runs queued between the run in-progress and latest queued. -# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. -concurrency: - group: "pages" - cancel-in-progress: false - -jobs: - # Single deploy job since we're just deploying - deploy: - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Setup Pages - uses: actions/configure-pages@v5 - - name: Upload artifact - uses: actions/upload-pages-artifact@v3 - with: - # Upload entire repository - path: "static" - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v4 diff --git a/.gitignore b/.gitignore index e69de29..45ddf0a 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +site/ diff --git a/static/BeAGoodClusterCitizen.html b/docs/BeAGoodClusterCitizen.html similarity index 100% rename from static/BeAGoodClusterCitizen.html rename to docs/BeAGoodClusterCitizen.html diff --git a/docs/requirements.txt b/docs/requirements.txt new file mode 100644 index 0000000..4ccbdaa --- /dev/null +++ b/docs/requirements.txt @@ -0,0 +1,27 @@ +# [mkdocs](https://github.com/mkdocs/mkdocs): +# Project documentation with Markdown. +mkdocs>=1.5.2 + +# [mkdocs-click](https://github.com/mkdocs/mkdocs-click): +# An MkDocs extension to generate documentation for Click command line applications. +#mkdocs-click>=0.8.0 + +# [mkdocs-typer](https://github.com/bruce-szalwinski/mkdocs-typer): +# An MkDocs extension to generate documentation for Typer command line applications. +#mkdocs-typer>=0.0.3 + +# [mkdocs-material](https://github.com/squidfunk/mkdocs-material): +# Documentation that simply works. +mkdocs-material>=9.2.5 + +# [mkdocstrings](https://github.com/mkdocstrings/mkdocstrings): +# 📘 Automatic documentation from sources, for MkDocs. +#mkdocstrings[python]>=0.22.0 + +# [mkdocs-macros-plugin](https://github.com/fralau/mkdocs_macros_plugin): +# Create richer and more beautiful pages in MkDocs, by using variables and calls to macros in the markdown code. +#mkdocs-macros-plugin>=1.0.4 + +# [mike](Manage multiple versions of your MkDocs-powered documentation via Git): +# Manage multiple versions of your MkDocs-powered documentation via Git +#mike>=1.1.2 diff --git a/mkdocs.yml b/mkdocs.yml index 2d5ced3..dd75dab 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -3,6 +3,8 @@ nav: - Home: index.md - Trixie Status: Trixie-Status.md - Account Codes: Account-Codes.md + - Presentations: + - Be a Good Cluster Citizen: BeAGoodClusterCitizen.html - General Info: - Available Software: Available-Software.md - Hardware: Hardware.md diff --git a/static/index.html b/static/index.html deleted file mode 100644 index d862d10..0000000 --- a/static/index.html +++ /dev/null @@ -1,21 +0,0 @@ - - - - Trixie - - - - - -

Trixie's Supplemental Documentation

-

Presentations

- - -