Add ecovacs hack #46
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: Build documentation and deploy | |
on: push | |
jobs: | |
build_and_deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
# Set up Python 3 | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v1 | |
with: | |
python-version: 3.9 | |
# Install pandoc and dependencies | |
- name: install pandoc and template dependencies | |
run: | | |
python3 -m pip install --upgrade pip | |
sudo apt-get install -y curl wget python3 python3-pip git | |
wget https://github.com/jgm/pandoc/releases/download/2.16.2/pandoc-2.16.2-1-amd64.deb && \ | |
sudo dpkg -i pandoc-2.16.2-1-amd64.deb | |
sudo apt-get install -y cabal-install && \ | |
cabal update && cabal install pandoc-sidenote && \ | |
sudo ln -s /home/runner/.cabal/bin/pandoc-sidenote /usr/bin/pandoc-sidenote | |
pip3 install pandoc-latex-fontsize | |
# Build | |
- name: Build documentation | |
run: | | |
make html | |
# Fixup | |
- name: Fixup | |
run: | | |
mkdir deploy | |
cp RHM.html deploy/index.html | |
cp -r css images fonts LICENSE CNAME deploy/ | |
cp .gitmodules deploy/ | |
# Deploy | |
- name: Push | |
uses: s0/git-publish-subdir-action@develop | |
env: | |
REPO: self | |
BRANCH: gh-pages # The branch name where you want to push the assets | |
FOLDER: deploy # The directory where your assets are generated | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # GitHub will automatically add this - you don't need to bother getting a token | |
MESSAGE: "Build: ({sha}) {msg}" # The commit message |