forked from cloned-doy/whatsfly
-
Notifications
You must be signed in to change notification settings - Fork 12
65 lines (53 loc) · 2.23 KB
/
Copy pathdocs.yml
File metadata and controls
65 lines (53 loc) · 2.23 KB
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: Build docs
on:
push:
branches: ["main"]
paths: [".github/**", "docs/**", "whatsfly/whatsapp.py" ]
release:
workflow_dispatch:
jobs:
build-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Setup Python
uses: actions/setup-python@v6.0.0
with:
# Version range or exact version of Python or PyPy to use, using SemVer's version range syntax. Reads from .python-version if unset.
python-version: ">3.12"
# File containing the Python version to use. Example: .python-version
# Used to specify a package manager for caching in the default directory. Supported values: pip, pipenv, poetry.
cache: pip # optional
# The target architecture (x86, x64, arm64) of the Python or PyPy interpreter.
# Set this option if you want the action to check for the latest available version that satisfies the version spec.
check-latest: true # optional
# The token used to authenticate when fetching Python distributions from https://github.com/actions/python-versions. When running this action on github.com, the default value is sufficient. When running on GHES, you can pass a personal access token for github.com if you are experiencing rate limiting.
- name: Install library
run: make setup
- name: Build docs
run: |
cd docs
uv run mkdocs build
- name: Upload docs as artifact
uses: actions/upload-pages-artifact@v3
with:
path: docs/site/
deploy:
# Add a dependency to the build job
needs: build-docs
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
# Specify runner + deployment step
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4 # or specific "vX.X.X" version tag for this action