Skip to content

Commit

Permalink
Separate doc build to avoid publising docs on PR
Browse files Browse the repository at this point in the history
  • Loading branch information
Svetlana Karslioglu committed Apr 22, 2022
1 parent dbcd905 commit 1b0133a
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 30 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/doc-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Doc Build

on: [push]


jobs:
build_docs_job:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Dependencies
run: |
echo `python3 --version`
sudo apt-get install -y python-setuptools
sudo apt-get install -y python3-sphinx
python3 -m pip install --upgrade pip
python3 -m pip install setuptools
id: build
- name: Build the docset
run: |
cd docs
pip install -r requirements.txt
make html
- name: Get output time
run: echo "The time was ${{ steps.build.outputs.time }}"
- name: Deploy
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages # The branch the action should deploy to.
FOLDER: ./docs/build/html # The folder the action should deploy.
30 changes: 0 additions & 30 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,33 +39,3 @@ jobs:
title: Daily CI failed
body: Commit ${{ github.sha }} daily scheduled [CI run](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}) failed, please check why
assignees: ''

build_docs_job:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Dependencies
run: |
echo `python3 --version`
sudo apt-get install -y python-setuptools
sudo apt-get install -y python3-sphinx
python3 -m pip install --upgrade pip
python3 -m pip install setuptools
id: build
- name: Build the docset
run: |
cd docs
pip install -r requirements.txt
make html
- name: Get output time
run: echo "The time was ${{ steps.build.outputs.time }}"
- name: Deploy
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages # The branch the action should deploy to.
FOLDER: ./docs/build/html # The folder the action should deploy.

0 comments on commit 1b0133a

Please sign in to comment.