From 11bfd4a79464e19910ba4d28a0a7560d612901e0 Mon Sep 17 00:00:00 2001 From: Marc Garcia Date: Tue, 26 Nov 2019 23:32:36 +0000 Subject: [PATCH 1/4] CI: Building docs in GitHub actions --- .github/workflows/ci.yml | 45 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5aa31e0ed3ab0..ca7cc288f1c13 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -101,3 +101,48 @@ jobs: echo "Benchmarks did not run, no changes detected" fi if: true + + 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/ + + - name: Create artifact + run: | + tar -czvf pandas_web.tar.gz pandas_web + + - name: Upload artifact + uses: actions/upload-artifact@master + with: + name: pandas_web + path: pandas_web.tar.gz From aae887744f175ec00cee6d09d41992c9d8fb1d94 Mon Sep 17 00:00:00 2001 From: Marc Garcia Date: Thu, 28 Nov 2019 23:59:23 +0000 Subject: [PATCH 2/4] Adding web synchronization with rclone --- .github/workflows/ci.yml | 36 ++++++++++++++++++++++++++++-------- 1 file changed, 28 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ca7cc288f1c13..97f7d38a60985 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -137,12 +137,32 @@ jobs: cp -r web/build/* pandas_web/ cp -r doc/build/html/* pandas_web/docs/ - - name: Create artifact - run: | - tar -czvf pandas_web.tar.gz pandas_web + - name: Install Rclone + run: sudo apt install rclone -y - - name: Upload artifact - uses: actions/upload-artifact@master - with: - name: pandas_web - path: pandas_web.tar.gz + - 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 + + - name: Sync web + run: | + REMOTE_PATH="dev" + if [[ "${{ github.event_name }}" == "pull_request" ]]; then + REMOTE_PATH="$REMOTE_PATH/pr/$PR_NUMBER" + fi + rclone sync pandas_web ovh_cloud_pandas_web:$REMOTE_PATH + env: + PR_NUMBER: ${{ github.event.pull_request.number }} From 1a8bfbe988a3399b1ca5e1270bd11143727665ad Mon Sep 17 00:00:00 2001 From: Marc Garcia Date: Sat, 30 Nov 2019 01:05:24 +0000 Subject: [PATCH 3/4] Pushing docs only for commits to master, and not PRs --- .github/workflows/ci.yml | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index af58f90fb0d5e..e6d07f1d5dd60 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -127,9 +127,11 @@ jobs: 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: | @@ -147,13 +149,8 @@ jobs: 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: | - REMOTE_PATH="dev" - if [[ "${{ github.event_name }}" == "pull_request" ]]; then - REMOTE_PATH="$REMOTE_PATH/pr/$PR_NUMBER" - fi - rclone sync pandas_web ovh_cloud_pandas_web:$REMOTE_PATH - env: - PR_NUMBER: ${{ github.event.pull_request.number }} + run: rclone sync pandas_web ovh_cloud_pandas_web:dev + if: github.event_name == "push" From 22814290c14202ed66e5bcf752c52b57b7867768 Mon Sep 17 00:00:00 2001 From: Marc Garcia Date: Sat, 30 Nov 2019 01:13:44 +0000 Subject: [PATCH 4/4] Trying to fix error by using single quotes --- .github/workflows/ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 47674e1e96212..912045f2e5013 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -130,11 +130,11 @@ jobs: mkdir -p pandas_web/docs cp -r web/build/* pandas_web/ cp -r doc/build/html/* pandas_web/docs/ - if: github.event_name == "push" + if: github.event_name == 'push' - name: Install Rclone run: sudo apt install rclone -y - if: github.event_name == "push" + if: github.event_name == 'push' - name: Set up Rclone run: | @@ -152,8 +152,8 @@ jobs: 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" + if: github.event_name == 'push' - name: Sync web run: rclone sync pandas_web ovh_cloud_pandas_web:dev - if: github.event_name == "push" + if: github.event_name == 'push'