Skip to content

black formatting

black formatting #11

Workflow file for this run

name: Build and Deploy documentation
on:
push:
branches:
- master
jobs:
build-and-deploy-docs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2.3.1
with:
persist-credentials: false
- name: Set up Python 3.10
uses: actions/setup-python@v2
with:
python-version: '3.10'
- name: Cache pip
id: cache-dev-pip
uses: actions/cache@v2
with:
# This path is specific to Ubuntu
# path: ~/.cache/pip
path: ${{ env.pythonLocation}}
# Look to see if there is a cache hit for the corresponding requirements file
key: ${{ runner.os }}_${{ env.pythonLocation}}_pip_dev_v1_3.10_${{ hashFiles('requirements-dev.txt') }}
- name: Install dependencies
if: steps.cache-dev-pip.outputs.cache-hit != 'true'
run: |
python -m pip install --upgrade pip
pip install -r requirements-dev.txt
- name: Build Documentation
run: |
cd docs
make clean
make html
- name: Commit documentation changes
run: |
git clone https://github.com/cve-search/cve-search.git --branch gh-pages --single-branch gh-pages
cp -r docs/build/html/* gh-pages/
cd gh-pages
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add .
git commit -m "Update documentation" -a || true
- name: Push changes
uses: ad-m/github-push-action@master
with:
branch: gh-pages
directory: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}