File tree Expand file tree Collapse file tree 1 file changed +46
-0
lines changed
Expand file tree Collapse file tree 1 file changed +46
-0
lines changed Original file line number Diff line number Diff line change 1+ name : CheckMkDocsBuild
2+ on :
3+ # Trigger the workflow on a new pull request on master
4+ pull_request_target :
5+ branches :
6+ - master
7+
8+ jobs :
9+ build-docs-site :
10+ runs-on : ubuntu-20.04
11+ steps :
12+ - uses : actions/checkout@v2
13+ - uses : actions/setup-python@v5
14+ with :
15+ python-version : ' 3.10.12'
16+
17+ - name : Allow to move dotfiles
18+ run : |
19+ # move also dotfile with *
20+ shopt -s dotglob
21+
22+ - name : Clone Moonbeam MKDocs
23+ run : |
24+ # clone mkdocs repo locally
25+ git clone https://${{ secrets.REPO_SCOPED_TOKEN }}@github.com/papermoonio/polkadot-mkdocs
26+
27+ - name : Move polkadot-docs contents to mkdocs repository
28+ run : |
29+ mkdir polkadot-mkdocs/polkadot-docs
30+ find . -mindepth 1 -maxdepth 1 ! -name 'polkadot-mkdocs' -exec mv {} polkadot-mkdocs/polkadot-docs/ \;
31+
32+ - name : Install pip requirements
33+ run : |
34+ cd polkadot-mkdocs
35+ # upgrade pip
36+ pip3 install --upgrade pip setuptools==65.7.0
37+ # install dependencies quietly
38+ pip3 install -r requirements.txt &> /dev/null && echo "Dependencies installed" || echo "Error while installing dependencies"
39+
40+ - name : Build mkdocs
41+ run : |
42+ cd polkadot-mkdocs
43+ # change destination build folder in mkdocs YAML to local site/
44+ sed -i 's/site_dir.*/site_dir: site/' mkdocs.yml
45+ # build project
46+ python3 -m mkdocs build
You can’t perform that action at this time.
0 commit comments