Skip to content

Commit a9699be

Browse files
chore: added a deploy to github pages workflow
This workflow builds the documentation using `mkdocs` and then publishes it onto the github pages site.
1 parent 359aff2 commit a9699be

File tree

2 files changed

+78
-0
lines changed

2 files changed

+78
-0
lines changed
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Deploy to GitHub Pages
2+
# Updates the GitHub pages website with the changes made in the last push.
3+
# Takes in all markdown files and images of the repository and turns that
4+
# into HTML to present on the GitHub pages website. Used for documentation.
5+
6+
on:
7+
workflow_dispatch:
8+
push:
9+
branches: [main, master, release, development]
10+
paths:
11+
- "**/.md"
12+
- "**/.markdown"
13+
- "**/.png"
14+
- "**/.svg"
15+
- "**/.jpg"
16+
- "**/.jpeg"
17+
- "**/*.webp"
18+
- "**/*.html"
19+
- "**/*.css"
20+
21+
permissions:
22+
contents: read
23+
pages: write
24+
id-token: write
25+
26+
concurrency:
27+
group: github-pages
28+
cancel-in-progress: false
29+
30+
jobs:
31+
32+
build:
33+
name: Build site
34+
runs-on: ubuntu-latest
35+
steps:
36+
- name: Checkout repository
37+
uses: actions/checkout@v6.0.1
38+
- name: Setup Pages
39+
uses: actions/configure-pages@v5.0.0
40+
- name: Set up Python
41+
uses: actions/setup-python@v4
42+
with: { python-version: '3.x' }
43+
- name: Install pip
44+
run: python -m pip install --upgrade pip
45+
- name: Install MkDocs and dependencies
46+
run: pip install mkdocs mkdocs-shadcn
47+
- name: Build site with MkDocs
48+
run: mkdocs build --site-dir ./_site
49+
- name: Upload artifact
50+
uses: actions/upload-pages-artifact@v4.0.0
51+
with: { path: ./_site }
52+
53+
deploy:
54+
name: Deploy site
55+
environment:
56+
name: github-pages
57+
url: ${{ steps.deployment.outputs.page_url }}
58+
runs-on: ubuntu-latest
59+
needs: build
60+
steps:
61+
- name: Deploy to GitHub Pages
62+
id: deployment
63+
uses: actions/deploy-pages@v4.0.5

mkdocs.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
site_name: Slyde
2+
description: Make beautifully animated Slydes and presentations from XML with ease!
3+
site_author: Tygo van den Hurk
4+
nav: []
5+
theme:
6+
name: shadcn
7+
show_title: true
8+
show_stargazers: false
9+
pygments_style:
10+
light: shadcn-light
11+
dark: shadcn-dark
12+
icon: assets/logo-standalone.svg
13+
show_datetime: true
14+
highlightjs: true
15+
color_mode: auto

0 commit comments

Comments
 (0)