From f6472fd66ed59de838e3e9df9fbe1fe0f74f1ec4 Mon Sep 17 00:00:00 2001 From: Francesco Bartoli Date: Tue, 20 Feb 2024 16:48:50 +0100 Subject: [PATCH] Add github action for docs deployment --- .github/workflows/docs.yml | 24 ++++++++++++++++++++++++ .github/workflows/openapi.yml | 1 - .gitignore | 1 + 3 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/docs.yml diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000..88f94e4 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,24 @@ +name: Deploy MkDocs Site + +on: + push: + branches: + - master +jobs: + deploy-docs: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4.1.1 + - name: Setup Python + uses: actions/setup-python@v5.0.0 + with: + python-version: "3.10" + - name: Install dependencies + run: pip install mkdocs mkdocs-material termynal + - name: Build MkDocs site + run: mkdocs build + - name: Deploy to GitHub Pages + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.MY_GITHUB_TOKEN }} + publish_dir: ./docs_build/site diff --git a/.github/workflows/openapi.yml b/.github/workflows/openapi.yml index 4fc91bf..f45a708 100644 --- a/.github/workflows/openapi.yml +++ b/.github/workflows/openapi.yml @@ -38,7 +38,6 @@ jobs: run: | echo 'extends: ["spectral:oas"]' > .spectral.oas3.yaml - # Create OWASP API Security 10 ruleset - name: Create OWASP API Security 10 run: | diff --git a/.gitignore b/.gitignore index 925ac7d..631df6d 100644 --- a/.gitignore +++ b/.gitignore @@ -119,6 +119,7 @@ venv.bak/ # mkdocs documentation /site +/docs_build # mypy .mypy_cache/