Skip to content

Update Ephys Socket documentation #8

Update Ephys Socket documentation

Update Ephys Socket documentation #8

Workflow file for this run

name: Update Documentation
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
# 1. Generate HTML files
- name: Check out repository code
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install pipenv
run: |
python -m pip install --upgrade pipenv wheel
- id: cache-pipenv
uses: actions/cache@v1
with:
path: ~/.local/share/virtualenvs
key: ${{ runner.os }}-pipenv-${{ hashFiles('**/Pipfile.lock') }}
- name: Install dependencies
if: steps.cache-pipenv.outputs.cache-hit != 'true'
run: |
pipenv install --deploy --dev
- name: Make
run: |
pipenv run make html
# 2. Add and commit HTML files to gh-pages branch
- name: Commit documentation changes
run: |
git clone https://github.com/${{ github.repository_owner }}/gui-docs.git --branch gh-pages --single-branch gh-pages
cd gh-pages
rm -rf *
cp -r ../docs/html/* .
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add .
git commit -m "Update documentation" -a || true
# 3. Push changes to gh-pages branch (updates documentation page)
- name: Push changes
uses: ad-m/github-push-action@master
with:
branch: gh-pages
directory: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}