Ilariae/security #28
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CheckMkDocsBuild | |
on: | |
# Trigger the workflow on a new pull request on main | |
pull_request_target: | |
branches: | |
- main | |
jobs: | |
build-docs-site: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Allow to move dotfiles | |
run: | | |
# move also dotfile with * | |
shopt -s dotglob | |
- name: Clone Wormhole MKDocs | |
run: | | |
# clone mkdocs repo locally | |
git clone https://${{ secrets.REPO_SCOPED_TOKEN }}@github.com/papermoonio/wormhole-mkdocs.git | |
- name: Move wormhole-docs contents to mkdocs repository | |
run: | | |
mkdir wormhole-mkdocs/wormhole-docs | |
mv * wormhole-mkdocs/wormhole-docs &> /dev/null || echo "Error with mv expected due to recursively moving all contents into subfolder" | |
- name: Install pip requirements | |
run: | | |
cd wormhole-mkdocs | |
# upgrade pip | |
pip3 install --upgrade pip setuptools==65.7.0 | |
# install dependencies quietly | |
pip3 install -r requirements.txt &> /dev/null && echo "Dependencies installed" || echo "Error while installing dependencies" | |
- name: Build mkdocs | |
run: | | |
cd wormhole-mkdocs | |
# change destination build folder in mkdocs YAML to local site/ | |
sed -i 's/site_dir.*/site_dir: site/' mkdocs.yml | |
# build project | |
python3 -m mkdocs build |