-
Notifications
You must be signed in to change notification settings - Fork 51
49 lines (42 loc) · 1.26 KB
/
update-site.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
# Update www.dvr-scan.com
name: Update Website
on:
push:
branches:
- main
paths:
- 'docs/**'
- 'website/**'
workflow_dispatch:
jobs:
update_site:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: '3.11'
cache: 'pip'
- name: Install Dependencies
run: |
python -m pip install --upgrade pip build wheel virtualenv
pip install -r website/requirements.txt
- name: Generate Website
run: |
mkdocs build -f website/mkdocs.yml
- name: Update Website
run: |
git fetch origin gh-pages
git checkout gh-pages
git rm * -r -f --ignore-unmatch
git checkout HEAD -- .nojekyll
git checkout HEAD -- CNAME
git add website/build/
git mv website/build/* . -f -k
git rm website/build/* -r -f --ignore-unmatch
git config --global user.name github-actions
git config --global user.email [email protected]
git commit -a -m "[docs] @${{ github.triggering_actor }}: Generate Website" \
-m "Commit: ${{ github.sha }}"
git push