Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions .github/workflows/github-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ name: github-samples-app
on:
push:
branches:
- master
- main

workflow_dispatch:
workflow_dispatch:

# schedule:
# - cron: '55 13 * * *'

# Top-level default; empty/no permissions
permissions: {}
# Top-level default; empty/no permissions
permissions: {}

jobs:
pages:
Expand All @@ -33,36 +33,36 @@ jobs:
ref: 'refs/heads/app/dev'

- uses: actions/checkout@v3
name: Check out master # checks out master in subdirectory
name: Check out main # checks out main in subdirectory
with:
ref: 'refs/heads/master'
path: master
ref: 'refs/heads/main'
path: main

- name: Build JSON DB
run: |
python3 -m pip install -r src/requirements.txt
echo master
python3 src/db.py master
echo main
python3 src/db.py main

- name: Remove JSON pre-prod
run: |
- name: Remove JSON pre-prod
run: |
rm -rf src/docs/sample_db_pre.json

- name: Build Sphinx
run: |
run: |
python3 -m sphinx -W -b html src/docs/ src/docs/_build/
echo $PWD
echo ${{ github.ref }}

- name: Add GPU-Occupancy-Calculator
env:
env:
GPU_OCC_CALC: src/docs/_build/Tools/GPU-Occupancy-Calculator/
run: |
mkdir -p ${GPU_OCC_CALC}
cp -v ${{ github.workspace }}/master/Tools/GPU-Occupancy-Calculator/index.html ${GPU_OCC_CALC}/index.html
cp -v ${{ github.workspace }}/main/Tools/GPU-Occupancy-Calculator/index.html ${GPU_OCC_CALC}/index.html

- name: Push docs
if: ${{ github.ref == 'refs/heads/master' }} # only if this workflow is run from the master branch, push docs
if: ${{ github.ref == 'refs/heads/main' }} # only if this workflow is run from the main branch, push docs
env:
GITHUB_USER: ${{ github.actor }}
GITHUB_TOKEN: ${{ github.token }}
Expand Down