Skip to content

CI: Building docs in GitHub actions #29874

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

Merged
merged 9 commits into from
Dec 30, 2019
62 changes: 62 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,3 +95,65 @@ jobs:
name: Benchmarks log
path: asv_bench/benchmarks.log
if: failure()

web_and_docs:
name: Web and docs
runs-on: ubuntu-latest
steps:

- name: Setting conda path
run: echo "::set-env name=PATH::${HOME}/miniconda3/bin:${PATH}"

- name: Checkout
uses: actions/checkout@v1

- name: Setup environment and build pandas
run: ci/setup_env.sh

- name: Build website
run: |
source activate pandas-dev
python web/pandas_web.py web/pandas --target-path=web/build

- name: Build documentation
run: |
source activate pandas-dev
doc/make.py --warnings-are-errors | tee sphinx.log ; exit ${PIPESTATUS[0]}

# This can be removed when the ipython directive fails when there are errors,
# including the `tee sphinx.log` in te previous step (https://github.com/ipython/ipython/issues/11547)
- name: Check ipython directive errors
run: "! grep -B1 \"^<<<-------------------------------------------------------------------------$\" sphinx.log"

- name: Merge website and docs
run: |
mkdir -p pandas_web/docs
cp -r web/build/* pandas_web/
cp -r doc/build/html/* pandas_web/docs/
if: github.event_name == 'push'

- name: Install Rclone
run: sudo apt install rclone -y
if: github.event_name == 'push'

- name: Set up Rclone
run: |
RCLONE_CONFIG_PATH=$HOME/.config/rclone/rclone.conf
mkdir -p `dirname $RCLONE_CONFIG_PATH`
echo "[ovh_cloud_pandas_web]" > $RCLONE_CONFIG_PATH
echo "type = swift" >> $RCLONE_CONFIG_PATH
echo "env_auth = false" >> $RCLONE_CONFIG_PATH
echo "auth_version = 3" >> $RCLONE_CONFIG_PATH
echo "auth = https://auth.cloud.ovh.net/v3/" >> $RCLONE_CONFIG_PATH
echo "endpoint_type = public" >> $RCLONE_CONFIG_PATH
echo "tenant_domain = default" >> $RCLONE_CONFIG_PATH
echo "tenant = 2977553886518025" >> $RCLONE_CONFIG_PATH
echo "domain = default" >> $RCLONE_CONFIG_PATH
echo "user = w4KGs3pmDxpd" >> $RCLONE_CONFIG_PATH
echo "key = ${{ secrets.ovh_object_store_key }}" >> $RCLONE_CONFIG_PATH
echo "region = BHS" >> $RCLONE_CONFIG_PATH
if: github.event_name == 'push'

- name: Sync web
run: rclone sync pandas_web ovh_cloud_pandas_web:dev
if: github.event_name == 'push'