From 1b0133ab9b853af29205468fbcded223501449bf Mon Sep 17 00:00:00 2001 From: Svetlana Karslioglu Date: Fri, 22 Apr 2022 14:01:59 -0700 Subject: [PATCH] Separate doc build to avoid publising docs on PR --- .github/workflows/doc-build.yml | 35 +++++++++++++++++++++++++++++++++ .github/workflows/main.yml | 30 ---------------------------- 2 files changed, 35 insertions(+), 30 deletions(-) create mode 100644 .github/workflows/doc-build.yml diff --git a/.github/workflows/doc-build.yml b/.github/workflows/doc-build.yml new file mode 100644 index 0000000000..3867ab93a2 --- /dev/null +++ b/.github/workflows/doc-build.yml @@ -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. diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8ceacd7850..d36fe473dc 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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.