forked from boppreh/keyboard
-
Notifications
You must be signed in to change notification settings - Fork 3
55 lines (46 loc) · 1.66 KB
/
update-gh-pages.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
44
45
46
47
48
49
50
51
52
53
54
55
name: Update Documentation
on:
push:
branches:
- main
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout 🛎️
uses: actions/[email protected]
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.11'
- name: Install dependencies 🔧
run: |
pip install --quiet pdoc3
pip install .
pip list
- name: Build API with pdoc3
run: pdoc --html --output-dir docs --force winrawin
- name: Upload Artifacts 🔺 # The project is then uploaded as an artifact named 'site'.
uses: actions/upload-artifact@v1
with:
name: site
path: docs
deploy:
concurrency: ci-${{ github.ref }}
needs: [build] # The second job must depend on the first one to complete before running and uses ubuntu-latest instead of windows.
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
- name: Download Artifacts 🔻 # The built project is downloaded into the 'site' folder.
uses: actions/download-artifact@v1
with:
name: site
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: 'site' # The deployment folder should match the name of the artifact. Even though our project builds into the 'build' folder the artifact name of 'site' must be placed here.
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages # The branch the action should deploy to.