Skip to content

Commit

Permalink
feat: Add action to build and deploy pages to GH-Pages
Browse files Browse the repository at this point in the history
  • Loading branch information
giovannicimolin committed May 3, 2024
1 parent 3dc5ba3 commit de938a1
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
31 changes: 31 additions & 0 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Publish Docs to GitHub Pages

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 de938a1

Please sign in to comment.