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

separate build and publish doc scripts #666

Closed
wants to merge 1 commit into from
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
48 changes: 48 additions & 0 deletions .github/workflows/build_and_publish_docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Build and Update Docs

on:
push:
branches: [ master ]

# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true

jobs:
build_and_publish_docs:
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@v2
- name: Setup conda env
uses: conda-incubator/setup-miniconda@v2
with:
miniconda-version: "latest"
activate-environment: test
- name: Install dependencies
shell: bash -l {0}
run: |
set -eux
conda activate test
pip install -r requirements.txt
pip install -r dev-requirements.txt
conda install pytorch cpuonly -c pytorch-nightly
python setup.py sdist bdist_wheel
pip install dist/*.whl
- name: Build docs
shell: bash -l {0}
run: |
set -eux
conda activate test
cd docs
pip install -r requirements.txt
make html
touch build/html/.nojekyll
cd ..
- name: Deploy docs to Github pages
uses: JamesIves/github-pages-deploy-action@v4.4.1
with:
branch: gh-pages # The branch the action should deploy to.
folder: docs/build/html # The folder the action should deploy.
target-folder: master
14 changes: 1 addition & 13 deletions .github/workflows/build_docs.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: Build and Update Docs
name: Build Docs

on:
push:
branches: [ master ]
pull_request:

# Allow one concurrent deployment
Expand Down Expand Up @@ -41,13 +39,3 @@ jobs:
make html
touch build/html/.nojekyll
cd ..
publish_docs:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' }}
steps:
- name: Deploy docs to Github pages
uses: JamesIves/github-pages-deploy-action@v4.4.1
with:
branch: gh-pages # The branch the action should deploy to.
folder: docs/build/html # The folder the action should deploy.
target-folder: master
Loading