Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

task(mkdocs): deploy mkdocs #3

Merged
merged 1 commit into from
May 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/workflows/mkdocs.yaml
Original file line number Diff line number Diff line change
@@ -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
40 changes: 0 additions & 40 deletions docs/SETUP.mdx

This file was deleted.

29 changes: 29 additions & 0 deletions docs/gcloud.md
Original file line number Diff line number Diff line change
@@ -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
```
3 changes: 3 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# FastAPI Boilerplate

Kickstart your [FastAPI](https://fastapi.tiangolo.com/) development with ease.
22 changes: 22 additions & 0 deletions docs/setup.md
Original file line number Diff line number Diff line change
@@ -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
```
8 changes: 8 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Loading