-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathdeploy-mkdocs-poetry.yml
43 lines (35 loc) · 1.08 KB
/
deploy-mkdocs-poetry.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/deploy-mkdocs-poetry.md
name: Deploy Website
env:
# See: https://github.com/actions/setup-python/tree/v2#available-versions-of-python
PYTHON_VERSION: "3.9"
# See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows
on:
push:
branches:
# TODO: Replace "main" below with default branch name if different.
- main
paths:
- ".github/workflows/deploy-mkdocs-poetry.ya?ml"
- "mkdocs.ya?ml"
- "poetry.lock"
- "pyproject.toml"
- "docs/**"
workflow_dispatch:
repository_dispatch:
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install Python
uses: actions/setup-python@v2
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install Poetry
run: pip install poetry
- name: Install Dependencies
run: poetry install --no-root
- name: Deploy website
run: poetry run mkdocs gh-deploy