Skip to content

Commit

Permalink
only use py3.10 for docs
Browse files Browse the repository at this point in the history
  • Loading branch information
daler committed Apr 9, 2024
1 parent f637f6f commit e87122c
Showing 1 changed file with 23 additions and 25 deletions.
48 changes: 23 additions & 25 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,31 +106,29 @@ jobs:
# Build docs and commit to gh-pages branch. Note that no push happens
# unless we're on the master branch
run: |
if [ ${{ matrix.python-version }} != "3.11" ]; then
eval "$(conda shell.bash hook)"
conda activate ./test-env
# Move to extracted tarball dir, see above notes
cd /tmp/pybedtools-uncompressed/pybedtools-*
(cd docs && make html)
git clone \
--single-branch \
--branch gh-pages "https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY" \
/tmp/docs
rm -rf /tmp/docs/*
cp -r docs/build/html/* /tmp/docs
touch /tmp/docs/.nojekyll
cd /tmp/docs
git add .
if git diff --cached --quiet; then
echo "no changes, nothing to commit"
else
git commit -m 'update docs'
fi
cd $WORKDIR
eval "$(conda shell.bash hook)"
conda activate ./test-env
# Move to extracted tarball dir, see above notes
cd /tmp/pybedtools-uncompressed/pybedtools-*
(cd docs && make html)
git clone \
--single-branch \
--branch gh-pages "https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY" \
/tmp/docs
rm -rf /tmp/docs/*
cp -r docs/build/html/* /tmp/docs
touch /tmp/docs/.nojekyll
cd /tmp/docs
git add .
if git diff --cached --quiet; then
echo "no changes, nothing to commit"
else
git commit -m 'update docs'
fi
cd $WORKDIR
- name: docs artifact
Expand All @@ -143,7 +141,7 @@ jobs:

- name: push docs to gh-pages branch
# Push docs to gh-pages if this test is running on master branch
if: ${{ (github.ref == 'refs/heads/master') && (matrix.python-version == 3.8) }}
if: ${{ (github.ref == 'refs/heads/master') && (matrix.python-version == 3.10) }}
run: |
cd /tmp/docs
git push "https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY" gh-pages
Expand Down

0 comments on commit e87122c

Please sign in to comment.