-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (44 loc) · 1.49 KB
/
docs.yml
File metadata and controls
55 lines (44 loc) · 1.49 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
name: docs
on:
push:
paths:
- "*/**/*.md"
- "docs/source/**/*"
- "cli.py"
- ".github/workflows/docs.yml"
workflow_dispatch:
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository code
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install documentation dependencies
run: |
pip install -U pip wheel
pip install -r docs/requirements.txt
- name: Install project dependencies
run: |
sed -i "/typer==0.6.1/d" requirements.txt
pip install -r requirements.txt
- name: Inject keys
run: echo -en "${{ secrets.KEYS_INI }}" >> keys.ini
- name: Build CLI reference
run: |
pip install typer-cli
export PYTHONPATH=$PYTHONPATH:.
typer cli.py utils docs --name loghours --output docs/source/cli.md
sed -i "1 s/.*/# CLI Reference/" docs/source/cli.md
- name: Build documentation
run: cd docs && make html && cd ..
- name: Push documentation to Firebase
uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_WORKING_HOURS_CLI }}'
channelId: live
projectId: working-hours-cli