Skip to content

Commit

Permalink
Merge pull request #343 from jazzband/giovanni/gh-pages-ci-job
Browse files Browse the repository at this point in the history
feat: Add action to build and deploy pages to GH-Pages
  • Loading branch information
giovannicimolin authored May 3, 2024
2 parents 3dc5ba3 + cde8a88 commit 65c8ffd
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 1 deletion.
34 changes: 34 additions & 0 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Publish Docs to GitHub Pages

permissions:
contents: write

on:
push:
branches:
- develop

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.x

- name: Install dependencies
run: pip install mkdocs-material

- name: Build docs
run: mkdocs build

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
personal_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./site
2 changes: 1 addition & 1 deletion mkdocs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ docker run --rm -it \
-w $MOUNT_FOLDER \
-p $MKDOCS_DEV_PORT:$MKDOCS_DEV_PORT \
-e MKDOCS_DEV_ADDR="$MKDOCS_DEV_ADDR:$MKDOCS_DEV_PORT" \
squidfunk/mkdocs-material:3.2.0 $*
squidfunk/mkdocs-material:latest $*

0 comments on commit 65c8ffd

Please sign in to comment.