Skip to content

Update base.html

Update base.html #146

Workflow file for this run

name: github-pages-app-dev
on:
push:
branches:
- app/dev
#TRIGGER on PR if changes made to below file-paths.
pull_request:
types:
- opened
- synchronize
branches:
- master
paths:
- "src/db.py"
- "src/requirements.txt"
- "src/docs/conf.py"
- "src/docs/Makefile"
- "src/docs/make.bat"
- "src/docs/_static/styles.css"
- "src/docs/_static/intel.css"
- "src/docs/_static/assets/logo-energyblue-white.svg"
- "src/docs/_static/sample_db_prd.json"
- "src/docs/_static/assets/favicon.ico"
- "src/docs/_static/script.js"
- "src/docs/_templates/base.html"
- "src/docs/_templates/index.html"
# defaults:
# run:
# working-directory: src
jobs:
pages:
name: Build GitHub Pages
runs-on: ubuntu-latest
steps:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.8"
# - run: find | sort
- uses: actions/checkout@v3
# with:
# path: app/dev
# Adding above 2 lines forces pre-pending filepaths below w/ 'app/dev/filepath'
- uses: actions/checkout@v3
name: Check out master
with:
ref: 'refs/heads/master'
path: master
# TODO: change to 'python3 app/dev/src/db.py master' per actions/checkout@3
- name: Build JSON DB
run: |
python3 -m pip install -r src/requirements.txt
echo master
python3 src/db.py master
- name: Remove JSON pre-prod
run: |
rm -rf src/docs/sample_db_pre.json
- name: Build Sphinx
run: |
python3 -m pip install -r src/requirements.txt
python3 -m sphinx -W -b html src/docs/ src/docs/_build/
echo $PWD
echo ${{ github.ref }}
- name: Add GPU-Occupancy-Calculator
env:
GPU_OCC_CALC: src/docs/_build/Tools/GPU-Occupancy-Calculator/
run: |
mkdir -p ${GPU_OCC_CALC}
cd ${GPU_OCC_CALC}
wget https://raw.githubusercontent.com/oneapi-src/oneAPI-samples/master/Tools/GPU-Occupancy-Calculator/index.html
- name: Push docs
if: ${{ github.ref == 'refs/heads/app/dev' }}
env:
GITHUB_USER: ${{ github.actor }}
GITHUB_TOKEN: ${{ github.token }}
GITHUB_REPO: ${{ github.repository }}
run: |
cd src/docs/_build/
touch .nojekyll
git init
git remote add origin "https://${GITHUB_USER}:${GITHUB_TOKEN}@github.com/${GITHUB_REPO}"
git add -A
git status
git config --global user.name "GitHub Actions"
git config --global user.email "[email protected]"
git commit -sm "$(date)"
git branch -M gh-pages
git push -u origin -f gh-pages