Skip to content

Update blank.yml

Update blank.yml #8

Workflow file for this run

name: Push Documentation to gh-pages
on:
push:
branches: [2.x] # Assuming 2.x is your main branch
pull_request:
branches: [2.x]
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.11" # Specify the Python version you need
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Build HTML Documentation
run: make html-prod
- name: Push to gh-pages branch
if: github.event_name == 'push' && github.ref == 'refs/heads/2.x'
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git checkout --orphan gh-pages
git rm -rf .
mv build/html/* .
git add .
git commit -m "Update documentation"
git push -f origin gh-pages