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

Fix Env build #101

Closed
Closed
Show file tree
Hide file tree
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
37 changes: 0 additions & 37 deletions .github/workflows/build_docs.yml

This file was deleted.

60 changes: 60 additions & 0 deletions .github/workflows/build_test_notebooks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Build & Test Notebooks

on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:

jobs:
build-notebooks:
runs-on: ubuntu-latest

steps:
- name: Checkout stingray repo
uses: actions/checkout@v4
with:
repository: StingraySoftware/stingray
path: ./stingray
submodules: recursive

- name: Get latest commit of the PR and Checkout PR version of notebooks
run: |
PR_SHA=$(curl -s 'https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}' | jq -r .head.sha)
if [ "$PR_SHA" == "null" ]; then
echo "::error::Failed to get PR SHA"
exit 1
fi
echo "commit=$PR_SHA" >> $GITHUB_ENV
cd ./stingray/docs/notebooks # Change to the submodule directory
pwd
git fetch origin $PR_SHA:pr_temp
git checkout pr_temp

- name: Verify submodule update
run: |
cd ./stingray/docs/notebooks
git log -1

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.10'

- name: Install pandoc and additional dependencies
run: |
sudo apt-get update
sudo apt-get install -y pandoc fonts-freefont-ttf
pip install sphinx sphinx-astropy tox

- name: Install Stingray
run: |
pip install -e ./stingray

- name: Run Build Docs
run: |
cd ./stingray
tox -e build_docs