Skip to content

Commit

Permalink
Merge pull request #6 from axi0m/mkdocs
Browse files Browse the repository at this point in the history
Mkdocs
  • Loading branch information
axi0m authored Apr 11, 2024
2 parents a23a260 + 33e83da commit c960ff6
Show file tree
Hide file tree
Showing 72 changed files with 512 additions and 1,963 deletions.
75 changes: 0 additions & 75 deletions .github/workflows/hugo.yml

This file was deleted.

74 changes: 74 additions & 0 deletions .github/workflows/mkdocs-gha.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Sample workflow for building and deploying a Hugo site to GitHub Pages
name: Deploy Material for MkDocs site to Pages

on:
push:
branches:
- main
# workflow_dispatch allows the site to be rebuilt and published manually if needed
workflow_dispatch:

# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source

concurrency: pages-build-and-deploy

jobs:
build:
runs-on: ubuntu-latest
# Running this action on a fork will likely fail anyway
# unless the forked repo also has access to material for mkdocs insiders
if: github.event.repository.fork == false
steps:
- uses: actions/checkout@v4

- name: Install dependencies
run: sudo apt-get install pngquant

# The .cache directory is used for 3rd party assets, as part of the privacy plugin.
# It is also used to cache the generated social media cards.
# Persisting the cache across builds dramatically speeds up the process.
- name: Load site cache
uses: actions/cache@v4
with:
key: ${{ github.ref }}
path: .cache

# We use poetry to manage mkdocs, plugins, etc
- name: Install poetry
run: pipx install poetry

- name: Setup Python
id: setup-python
uses: actions/setup-python@v5
with:
python-version: "3.12"
# This ensures the package cache for poetry/pip is persisted, again speeding up this build action.
cache: "poetry"

- name: Install deps
run: poetry install
- name: Build site
run: poetry run mkdocs build

# Upload the built site as an artifact, this will be used by the deploy job.
- uses: actions/upload-pages-artifact@v3
with:
path: "site"

deploy:
needs: build

# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

# Specify runner + deployment step
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
6 changes: 0 additions & 6 deletions .gitmodules

This file was deleted.

Empty file removed .hugo_build.lock
Empty file.
14 changes: 14 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]
mkdocs-rss-plugin = "*"
mkdocs-git-authors-plugin = "*"
mkdocs-minify-plugin = "*"

[dev-packages]

[requires]
python_version = "3.11"
Loading

0 comments on commit c960ff6

Please sign in to comment.