From de938a1fbe6f1a1a0c24a8bd4a07022c882b3b5f Mon Sep 17 00:00:00 2001 From: Giovanni Cimolin Date: Fri, 3 May 2024 10:33:46 +0200 Subject: [PATCH] feat: Add action to build and deploy pages to GH-Pages --- .github/workflows/gh-pages.yml | 31 +++++++++++++++++++++++++++++++ mkdocs.sh | 2 +- 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/gh-pages.yml diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml new file mode 100644 index 00000000..21252e9e --- /dev/null +++ b/.github/workflows/gh-pages.yml @@ -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 \ No newline at end of file diff --git a/mkdocs.sh b/mkdocs.sh index ac64849e..8365e1ae 100755 --- a/mkdocs.sh +++ b/mkdocs.sh @@ -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 $*