Skip to content

Commit

Permalink
Update build_docs.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
achamma723 authored Jul 8, 2024
1 parent 829448d commit 9c67d43
Showing 1 changed file with 27 additions and 26 deletions.
53 changes: 27 additions & 26 deletions .github/workflows/build_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,43 +17,44 @@ permissions:
contents: write

jobs:
# build_docs:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-python@v5
# - name: Install dependencies
# run: |
# pip install -r doc/doc-requirements.txt
# pip install -e .
# - name: Sphinx build
# id: build-docs
# run: |
# sphinx-build -b html doc doc/_build/html
# - name: Upload documentation
# if: steps.build-docs.outcome == 'success'
# uses: actions/upload-artifact@v4
# with:
# name: DocHTML
# path: doc/_build/html
build_docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- name: Install dependencies
run: |
pip install -r doc/doc-requirements.txt
pip install -e .
- name: Sphinx build
id: build-docs
run: |
sphinx-build -b html doc doc/_build/html
- name: Upload documentation
if: steps.build-docs.outcome == 'success'
uses: actions/upload-artifact@v4
with:
name: DocHTML
path: doc/_build/html

deploy_on_main:
runs-on: ubuntu-latest
# needs: [build_docs]
if: ${{ contains(fromJSON('["push", "workflow_dispatch", "schedule"]'), github.event_name)}}
steps:
# - name: Download artifacts
# uses: actions/download-artifact@v4
# with:
# name: DocHTML
# path: ~/doc/_build/html
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: DocHTML
path: doc/_build/html
- name: Commit to main
run: |
git clone --depth 1 https://github.com/${{ github.repository_owner }}/hidimstat.git
ls hidimstat/doc/_build
rm -Rf hidimstat/doc/_build
ls hidimstat/doc/_build
mkdir hidimstat/doc/_build
ls -a
ls hidimstat
ls hidimstat/doc
cp -r doc/_build/html hidimstat/doc/_build
cd hidimstat
git config --global user.email "[email protected]"
Expand Down

0 comments on commit 9c67d43

Please sign in to comment.