Skip to content

CI: Sync web and dev docs automatically with prod server #33341

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 2 commits into from
Apr 7, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 9 additions & 23 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,32 +125,18 @@ jobs:
- name: Check ipython directive errors
run: "! grep -B1 \"^<<<-------------------------------------------------------------------------$\" sphinx.log"

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

- name: Set up Rclone
- name: Install ssh key
run: |
CONF=$HOME/.config/rclone/rclone.conf
mkdir -p `dirname $CONF`
echo "[ovh_host]" > $CONF
echo "type = swift" >> $CONF
echo "env_auth = false" >> $CONF
echo "auth_version = 3" >> $CONF
echo "auth = https://auth.cloud.ovh.net/v3/" >> $CONF
echo "endpoint_type = public" >> $CONF
echo "tenant_domain = default" >> $CONF
echo "tenant = 2977553886518025" >> $CONF
echo "domain = default" >> $CONF
echo "user = w4KGs3pmDxpd" >> $CONF
echo "key = ${{ secrets.ovh_object_store_key }}" >> $CONF
echo "region = BHS" >> $CONF
mkdir -m 700 -p ~/.ssh
echo "${{ secrets.server_ssh_key }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
echo "${{ secrets.server_ip }} ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBE1Kkopomm7FHG5enATf7SgnpICZ4W2bw+Ho+afqin+w7sMcrsa0je7sbztFAV8YchDkiBKnWTG4cRT+KZgZCaY=" > ~/.ssh/known_hosts
if: github.event_name == 'push'

- name: Sync web with OVH
run: rclone sync --exclude pandas-docs/** web/build ovh_host:prod
- name: Upload web
run: rsync -az --delete --exclude='pandas-docs' --exclude='Pandas_Cheat_Sheet*' web/build/ docs@${{ secrets.server_ip }}:/usr/share/nginx/pandas
if: github.event_name == 'push'

- name: Sync dev docs with OVH
run: rclone sync doc/build/html ovh_host:prod/pandas-docs/dev
- name: Upload dev docs
run: rsync -az --delete doc/build/html/ docs@${{ secrets.server_ip }}:/usr/share/nginx/pandas/pandas-docs/dev
if: github.event_name == 'push'