-
Notifications
You must be signed in to change notification settings - Fork 171
73 lines (73 loc) · 2.25 KB
/
build-deploy.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
72
73
name: build-deploy-gh-pages
on:
push:
branches:
- master
env:
GH_TOKEN: ${{ secrets.PERSONAL_TOKEN }}
PERSONAL_TOKEN: ${{ secrets.PERSONAL_TOKEN }}
CUSTOM_DOMAIN: awesome.video
CONFIG_FILE: mkdocs.yml
EXTRA_PACKAGES: build-base
REQUIREMENTS: requirements.txt
GIT_DISCOVERY_ACROSS_FILESYSTEM: 1
jobs:
awesomebot:
runs-on: ubuntu-latest
container:
image: ruby:latest
steps:
- uses: actions/[email protected]
- name: install awesomebot
run: gem install awesome_bot
- name: run awesomebot
run: awesome_bot contents.json --allow-ssl --allow-redirect -a 403,503,429,404,500,443
json-validate:
runs-on: ubuntu-latest
container:
image: python:3.7.12
steps:
- uses: actions/[email protected]
- name: install json-spec
run: pip install json-spec
- name: run json validate
run: json validate --schema-file=.github/schema.json --document-file=contents.json
gen-awesome-video:
runs-on: ubuntu-latest
needs:
- awesomebot
- json-validate
steps:
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: 16
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9
- uses: actions/checkout@v4
- name: run README.md gen
run: ruby .github/convert.rb
- name: run database.json gen
run: node .github/upgradeDb.js
- name: install mkdoc build deps
run: sudo apt-get update && sudo apt-get -y install lsb-release unzip python3-pip python3-dev && pip3 install mkdocs mkdocs-material json-spec
- name: use makefile to install all deps to ensure we have the same versions
run: make site_install
- name: use makefile to install all deps to ensure we have the same versions
run: make site_build
- name: Deploy docs
uses: mhausenblas/mkdocs-deploy-gh-pages@master
with:
GH_TOKEN: ${{ secrets.PERSONAL_TOKEN }}
PERSONAL_TOKEN: ${{ secrets.PERSONAL_TOKEN }}
CONFIG_FILE: mkdocs.yml
EXTRA_PACKAGES: build-base
REQUIREMENTS: requirements.txt
GIT_DISCOVERY_ACROSS_FILESYSTEM: 1
CUSTOM_DOMAIN: awesome.video