Skip to content

Commit 2d44865

Browse files
CI: Sync web and dev docs automatically with prod server (#33341)
1 parent 6ae710a commit 2d44865

File tree

1 file changed

+9
-23
lines changed

1 file changed

+9
-23
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -125,32 +125,18 @@ jobs:
125125
- name: Check ipython directive errors
126126
run: "! grep -B1 \"^<<<-------------------------------------------------------------------------$\" sphinx.log"
127127

128-
- name: Install Rclone
129-
run: sudo apt install rclone -y
130-
if: github.event_name == 'push'
131-
132-
- name: Set up Rclone
128+
- name: Install ssh key
133129
run: |
134-
CONF=$HOME/.config/rclone/rclone.conf
135-
mkdir -p `dirname $CONF`
136-
echo "[ovh_host]" > $CONF
137-
echo "type = swift" >> $CONF
138-
echo "env_auth = false" >> $CONF
139-
echo "auth_version = 3" >> $CONF
140-
echo "auth = https://auth.cloud.ovh.net/v3/" >> $CONF
141-
echo "endpoint_type = public" >> $CONF
142-
echo "tenant_domain = default" >> $CONF
143-
echo "tenant = 2977553886518025" >> $CONF
144-
echo "domain = default" >> $CONF
145-
echo "user = w4KGs3pmDxpd" >> $CONF
146-
echo "key = ${{ secrets.ovh_object_store_key }}" >> $CONF
147-
echo "region = BHS" >> $CONF
130+
mkdir -m 700 -p ~/.ssh
131+
echo "${{ secrets.server_ssh_key }}" > ~/.ssh/id_rsa
132+
chmod 600 ~/.ssh/id_rsa
133+
echo "${{ secrets.server_ip }} ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBE1Kkopomm7FHG5enATf7SgnpICZ4W2bw+Ho+afqin+w7sMcrsa0je7sbztFAV8YchDkiBKnWTG4cRT+KZgZCaY=" > ~/.ssh/known_hosts
148134
if: github.event_name == 'push'
149135

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

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

0 commit comments

Comments
 (0)