-
-
Notifications
You must be signed in to change notification settings - Fork 97
71 lines (60 loc) · 1.74 KB
/
build-docs.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: Docs
on:
push:
branches:
- master
jobs:
build:
name: Build & Deploy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install mkdocs
- name: Build Documentation
run: |
python redditdownloader/tools/doc_builder.py
mkdocs build
- name: Deploy to gh-pages branch
uses: peaceiris/[email protected]
env:
ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}
PUBLISH_BRANCH: gh-pages
PUBLISH_DIR: ./site
with:
username: "shadow-bot"
useremail: "[email protected]"
build_loc_badge:
runs-on: ubuntu-latest
name: Build LoC Badge
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Generate Badge
uses: shadowmoose/[email protected]
id: badge
with:
debug: true
directory: ./
badge: ./output/loc-badge.svg
ignore: '**/js/libs/**|**/web/img/**|*.zip|**/alertify.css'
badge_label: 'Lines of Code'
- name: Print the output
run: |
echo "Scanned: ${{ steps.badge.outputs.counted_files }}";
echo "Line Count: ${{ steps.badge.outputs.total_lines }}";
- name: Deploy Badge
uses: peaceiris/[email protected]
env:
ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}
PUBLISH_BRANCH: project-badges
PUBLISH_DIR: ./output
with:
username: "shadow-bot"
useremail: "[email protected]"