Skip to content

Commit 731cd31

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 731cd31

File tree

2 files changed

+80
-0
lines changed

2 files changed

+80
-0
lines changed
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
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+
- ".github/workflows/push--deploy-github-pages.yaml"
12+
- "mkdocs.yml"
13+
- "**/.md"
14+
- "**/.markdown"
15+
- "**/.png"
16+
- "**/.svg"
17+
- "**/.jpg"
18+
- "**/.jpeg"
19+
- "**/*.webp"
20+
- "**/*.html"
21+
- "**/*.css"
22+
23+
permissions:
24+
contents: read
25+
pages: write
26+
id-token: write
27+
28+
concurrency:
29+
group: github-pages
30+
cancel-in-progress: false
31+
32+
jobs:
33+
34+
build:
35+
name: Build site
36+
runs-on: ubuntu-latest
37+
steps:
38+
- name: Checkout repository
39+
uses: actions/checkout@v6.0.1
40+
- name: Setup Pages
41+
uses: actions/configure-pages@v5.0.0
42+
- name: Set up Python
43+
uses: actions/setup-python@v4
44+
with: { python-version: '3.x' }
45+
- name: Install pip
46+
run: python -m pip install --upgrade pip
47+
- name: Install MkDocs and dependencies
48+
run: pip install mkdocs mkdocs-shadcn
49+
- name: Build site with MkDocs
50+
run: mkdocs build --site-dir ./_site
51+
- name: Upload artifact
52+
uses: actions/upload-pages-artifact@v4.0.0
53+
with: { path: ./_site }
54+
55+
deploy:
56+
name: Deploy site
57+
environment:
58+
name: github-pages
59+
url: ${{ steps.deployment.outputs.page_url }}
60+
runs-on: ubuntu-latest
61+
needs: build
62+
steps:
63+
- name: Deploy to GitHub Pages
64+
id: deployment
65+
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)