Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation with Github Actions #172

Closed
wants to merge 11 commits into from
Closed

Documentation with Github Actions #172

wants to merge 11 commits into from

Conversation

Div12345
Copy link
Collaborator

This does the part of building the docs and committing to moabb.github.io repo from where the GH page works. Pushing not yet done.
Closes #78

@Div12345
Copy link
Collaborator Author

Problems -

  1. The Github Action sphinx-action only works on Ubuntu
  2. It requires the necessary libraries for the documentation to be mentioned in a requirements.txt file and pip installs everything, hence fails at moabb, not sure how to find a way to use the dependencies installed(through poetry) in the previous steps in this. (Latest version doesn't have the poetry usage)

Comment on lines -1 to -38
name: Test

on:
push:
branches: [master]
pull_request:
branches: [master]

jobs:
test:
name: ${{ matrix.os }}, py-${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-18.04, windows-latest, macOS-latest]
python-version: ["3.6", "3.7", "3.8", "3.9"]
steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- uses: pre-commit/[email protected]
- name: Install dependencies
shell: bash
run: |
python -m pip install --upgrade pip poetry wheel
poetry config virtualenvs.create false
poetry install
- name: Run tests
shell: bash
run: |
python -m unittest moabb.tests
- name: Run pipelines
shell: bash
run: |
python -m moabb.run --pipelines=./moabb/tests/test_pipelines/ --verbose
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why delete this?

push:
branches: [master]
pull_request:
branches: [master]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Docs should be built but not deployed on PRs.

Comment on lines +1 to +4
matplotlib
sphinx_bootstrap_theme
git
git+https://github.com/NeuroTechX/moabb
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These dependencies are already in pyproject.toml, why keep a separate requirements.txt?

Comment on lines +35 to +46
- name: Commit documentation changes
run: |
git clone https://github.com/NeuroTechX/moabb.github.io.git --branch master --single-branch master
cp -r docs/_build/html/* master/
cd master
touch .nojekyll
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
git add .
git commit -m "Update documentation" -a || true
# The above command will fail if no changes were present, so we ignore
# that.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are good actions for this (to avoid the mess), see for example: NeuroTechX/EEG-ExPy#62

Deploy should also only happen on master branch, see: https://github.com/NeuroTechX/eeg-notebooks/pull/62/files#r540869378

Suggested change
- name: Commit documentation changes
run: |
git clone https://github.com/NeuroTechX/moabb.github.io.git --branch master --single-branch master
cp -r docs/_build/html/* master/
cd master
touch .nojekyll
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
git add .
git commit -m "Update documentation" -a || true
# The above command will fail if no changes were present, so we ignore
# that.
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/master'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/_build/html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update Documentation
2 participants