Files
satware.ai/.github/workflows/deploy-preview.yml
3e2f9d0648 Blog/quality check (#122)
* Add blog post template for quality improvement initiative (Refs #121)

* Update YAML frontmatter for 2025-05-25-sequential-thinking-revolution.md (Refs #121)

* Update YAML frontmatter for 2025-06-04-ki-fuer-einsteiger-live-erleben.md (Refs #121)

* Corrected YAML frontmatter and flagged for translation for 2025-05-25-sequential-thinking-revolution.md (Refs #121)

* Corrected YAML frontmatter and flagged for translation for 2025-06-04-ki-fuer-einsteiger-live-erleben.md (Refs #121)

* Finalize 2025-05-25-sequential-thinking-revolution.md (Refs #121)

* Finalize 2025-06-04-ki-fuer-einsteiger-live-erleben.md (Refs #121)

* Translated 2025-05-25-sequential-thinking-revolution.md to German (Refs #121)

* Fix: Exclude blog-post-template.md from MkDocs blog plugin (Refs #ISSUE_NUMBER)

* Fix: Revert mkdocs.yml exclude and fix typo in redirects (Refs #ISSUE_NUMBER)

* Move blog-post-template.md to docs/templates/blog (Refs #ISSUE_NUMBER)

* Delete docs/blog/posts/blog-post-template.md

Signed-off-by: Michael Wegener <mw@satware.com>

* Fix: Correctly decode and update blog-post-template.md (Refs #ISSUE_NUMBER)

* Fix: Correct typo in mkdocs.yml redirect_maps (Refs #ISSUE_NUMBER)

* Fix: Add fetch-depth: 0 to checkout action in deploy-preview.yml (Refs #ISSUE_NUMBER)

* Fix: Add fetch-depth: 0 to checkout action in deploy-live.yml (Refs #ISSUE_NUMBER)

---------

Signed-off-by: Michael Wegener <mw@satware.com>
Co-authored-by: Jane Alesi <ja@satware.ai>
2025-06-10 01:03:03 +02:00

77 lines
2.2 KiB
YAML

name: MkDocs Preview Deployment
on:
workflow_dispatch: # Allows manual triggering
push:
branches:
- 'feature/**'
- 'fix/**'
- 'blog/**'
- 'build/**'
- 'test/**'
- 'preview/**'
jobs:
deploy-preview:
runs-on: ubuntu-22.04
permissions:
contents: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # <--- ADDED THIS LINE
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Install MkDocs and plugins
run: |
pip install --upgrade pip
pip install \
cairosvg \
libsass \
mkdocs-exclude \
mkdocs-git-revision-date-localized-plugin \
mkdocs-glightbox \
mkdocs-include-markdown-plugin \
mkdocs-literate-nav \
mkdocs-macros-plugin \
mkdocs-material==9.6.14 \
"mkdocs-material[imaging]" \
mkdocs-minify-plugin \
mkdocs-redirects \
mkdocs-rss-plugin \
mkdocs-snippets \
mkdocs-video \
watchdog
- name: Configure site_url for fork preview
run: |
# Extract GitHub username and repo name
GITHUB_USER=$(echo $GITHUB_REPOSITORY | cut -d '/' -f 1)
REPO_NAME=$(echo $GITHUB_REPOSITORY | cut -d '/' -f 2)
# Update site_url in mkdocs.yml for fork preview
if grep -q "^site_url:" mkdocs.yml; then
sed -i "s|^site_url:.*|site_url: https://${GITHUB_USER}.github.io/${REPO_NAME}/|" mkdocs.yml
else
echo "site_url: https://${GITHUB_USER}.github.io/${REPO_NAME}/" >> mkdocs.yml
fi
echo "Updated mkdocs.yml for preview deployment:"
cat mkdocs.yml
- name: Build css
run: |
mkdir -p docs/assets/css
pysassc overrides/assets/css/custom.scss docs/assets/css/custom.css
- name: Build static site
run: mkdocs build
- name: Deploy to GitHub Pages
run: mkdocs gh-deploy --force