trivial: fix flake8 warnings #84
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: 'EBBR CI Build' | |
# yamllint disable-line rule:truthy | |
on: | |
push: | |
branches: '**' | |
tags: 'v*' | |
pull_request: | |
branches: main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
# checkout@v3 doesn't preserve annotations when fetching the tag | |
# Forcing the tags to be fetched fixes it so the version is correct | |
- name: 'Identify Version' | |
run: | | |
git fetch --force --tags | |
echo "EBBR_VERSION=$(git describe)" >> $GITHUB_ENV | |
- name: 'Install Debian required packages' | |
run: | | |
sudo apt update | |
sudo apt install python3-pip latexmk libalgorithm-diff-perl texlive \ | |
texlive-latex-extra texlive-humanities | |
- name: 'Install Python required packages' | |
run: | | |
pip3 install --user mako | |
pip3 install --user typing | |
pip3 install --user Sphinx | |
- name: 'Check' | |
run: make check | |
- name: 'Build PDF' | |
run: | | |
make latexpdf | |
cp build/latex/ebbr.pdf build/ebbr-${{ env.EBBR_VERSION }}.pdf | |
- name: 'Build HTML' | |
run: make html | |
- name: 'Build Single HTML' | |
run: make singlehtml | |
- name: 'Upload artifacts' | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ebbr-${{ env.EBBR_VERSION }} | |
path: | | |
build/ebbr-*.pdf | |
build/html/ | |
build/singlehtml/ | |
- name: 'Deploy to Github Pages' | |
uses: peaceiris/actions-gh-pages@v3 | |
if: ${{ github.ref == 'refs/heads/main' }} | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./build/singlehtml | |
- name: 'Publish Release' | |
uses: softprops/action-gh-release@v1 | |
if: endsWith(github.ref, env.EBBR_VERSION) | |
with: | |
files: build/ebbr-*.pdf | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |