From 43931011f359def22f9f444b3486cf9dfdb57702 Mon Sep 17 00:00:00 2001 From: svaponi <10941963+svaponi@users.noreply.github.com> Date: Fri, 19 Apr 2024 15:10:31 +0200 Subject: [PATCH] task(mkdocs): deploy mkdocs --- .github/workflows/mkdocs.yaml | 30 ++++++++++++++++++++++++++ docs/SETUP.mdx | 40 ----------------------------------- docs/gcloud.md | 29 +++++++++++++++++++++++++ docs/index.md | 3 +++ docs/setup.md | 22 +++++++++++++++++++ mkdocs.yml | 8 +++++++ pyproject.toml | 2 ++ 7 files changed, 94 insertions(+), 40 deletions(-) create mode 100644 .github/workflows/mkdocs.yaml delete mode 100644 docs/SETUP.mdx create mode 100644 docs/gcloud.md create mode 100644 docs/index.md create mode 100644 docs/setup.md create mode 100644 mkdocs.yml diff --git a/.github/workflows/mkdocs.yaml b/.github/workflows/mkdocs.yaml new file mode 100644 index 0000000..ae426cf --- /dev/null +++ b/.github/workflows/mkdocs.yaml @@ -0,0 +1,30 @@ +# Builds the docs using mkdocs and pushes the result to `gh-pages` branch. +name: Docs +run-name: Build Docs 📄 +on: + push: + branches: + - main +permissions: + contents: write +jobs: + deploy: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [ "3.12" ] + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Set up python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + cache: 'pip' + - name: Install Requirements + run: | + sudo apt-get update && + sudo apt-get install pngquant && + pip install mkdocs-material mkdocs-material-extensions pillow cairosvg + - name: Build and deploy MkDocs + run: mkdocs gh-deploy --force diff --git a/docs/SETUP.mdx b/docs/SETUP.mdx deleted file mode 100644 index 93e15a8..0000000 --- a/docs/SETUP.mdx +++ /dev/null @@ -1,40 +0,0 @@ -# Local Setup - -## Install Poetry - -1. Install it from the [Poetry Installation](https://python-poetry.org/docs/#installation) page. -2. Check the installation by running: - - ```shell - poetry --version - ``` - -3. Make sure your version is **1.2.2 or higher.** - -## Install GCloud CLI - -1. Install it from the [GCloud Installation](https://cloud.google.com/sdk/docs/install) page. -2. Run in terminal: - - ```shell - gcloud init - ``` - -3. You will be asked to sign via Google Sign On. -4. Choose your project option from the menu. - -## Install G-Cloud implementation of keyring in Poetry - -1. Run in terminal: - - ```sh - poetry self add keyrings.google-artifactregistry-auth - ``` - -### Install Dependencies via Poetry - -1. Run in terminal: - - ```sh - poetry install - ``` diff --git a/docs/gcloud.md b/docs/gcloud.md new file mode 100644 index 0000000..9a03b02 --- /dev/null +++ b/docs/gcloud.md @@ -0,0 +1,29 @@ +# Google Cloud Integration + +This page contains information on how to configure the application to use resources on Google Cloud. +Use-cases: + +- Install private dependencies published on [Artifact Registry](https://cloud.google.com/artifact-registry). +- Publish docker image on [Artifact Registry](https://cloud.google.com/artifact-registry). +- Deploy to [Google Kubernetes Engine (GKE)](https://cloud.google.com/kubernetes-engine). +- Deploy to [Cloud Run](https://cloud.google.com/run). + +## Install Google Cloud CLI + +- Install it from the [GCloud Installation](https://cloud.google.com/sdk/docs/install) page. +- Run in terminal: + +```shell +gcloud init +``` + +- You will be asked to sign via Google Sign On. +- Choose your project from the menu. + +## Add Google Cloud implementation of keyring to Poetry + +1. Run in terminal: + +```sh +poetry self add keyrings.google-artifactregistry-auth +``` diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 0000000..75a51a8 --- /dev/null +++ b/docs/index.md @@ -0,0 +1,3 @@ +# FastAPI Boilerplate + +Kickstart your [FastAPI](https://fastapi.tiangolo.com/) development with ease. diff --git a/docs/setup.md b/docs/setup.md new file mode 100644 index 0000000..5fc5d94 --- /dev/null +++ b/docs/setup.md @@ -0,0 +1,22 @@ +# Setup + +This page contain information on how to set up the project locally. + +## Install Poetry + +- Install it from the [Poetry Installation](https://python-poetry.org/docs/#installation) page. +- Check the installation by running: + +```shell +poetry --version +``` + +- Make sure your version is **>=1.2.2**. + +### Install Dependencies via Poetry + +- Run in terminal: + +```sh +poetry install +``` diff --git a/mkdocs.yml b/mkdocs.yml new file mode 100644 index 0000000..8e9f98c --- /dev/null +++ b/mkdocs.yml @@ -0,0 +1,8 @@ +site_name: FastAPI Boilerplate +site_url: https://svaponi.github.io/fastapi-boilerplate +nav: + - Home: index.md + - Setup: setup.md + - Cloud Integration: + - Google Cloud: gcloud.md +theme: readthedocs diff --git a/pyproject.toml b/pyproject.toml index 0bee2f7..d61ae31 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,6 +5,8 @@ description = "" authors = ["svaponi <10941963+svaponi@users.noreply.github.com>"] license = "MIT" readme = "README.md" +repository = "https://github.com/svaponi/fastapi-boilerplate" +homepage = "https://svaponi.github.io/fastapi-boilerplate" [tool.poetry.dependencies] python = "^3.12"