converting to SFTP

This commit is contained in:
rusefi 2021-11-14 16:51:32 -05:00
parent 9e2e4da91f
commit 1b22cc2a21
1 changed files with 5 additions and 7 deletions

View File

@ -4,8 +4,6 @@
#
# the opposite merge is implemented as https://github.com/rusefi/rusefi/blob/master/.github/workflows/sync-wiki.yaml
#
# TODO: convert to sftp
#
name: Sync Wiki
@ -61,17 +59,17 @@ jobs:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
run: |
if [ "${{github.ref}}" = "refs/heads/master" ]; then
echo "::set-env name=RUSEFI_FTP_SERVER::${{secrets.RUSEFI_FTP_SERVER}}";
echo "::set-env name=RUSEFI_DOXYGEN_FTP_USER::${{secrets.RUSEFI_DOXYGEN_FTP_USER}}";
echo "::set-env name=RUSEFI_DOXYGEN_FTP_PASS::${{secrets.RUSEFI_DOXYGEN_FTP_PASS}}";
echo "::set-env name=RUSEFI_SSH_SERVER::${{secrets.RUSEFI_SSH_SERVER}}";
echo "::set-env name=RUSEFI_SSH_USER::${{secrets.RUSEFI_SSH_USER}}";
echo "::set-env name=RUSEFI_SSH_PASS::${{secrets.RUSEFI_SSH_PASS}}";
fi
- name: Upload static results to wiki3
run: |
cd mkdocs/
mv site wiki
if [ -n "$RUSEFI_FTP_SERVER" ]; then
if [ -n "$RUSEFI_SSH_SERVER" ]; then
echo "Uploading Wiki"
ncftpput -R -z -m -V -u "$RUSEFI_DOXYGEN_FTP_USER" -p "$RUSEFI_DOXYGEN_FTP_PASS" "$RUSEFI_FTP_SERVER" / wiki
tar -czf - wiki | sshpass -p "$RUSEFI_SSH_PASS" ssh -o StrictHostKeyChecking=no "$RUSEFI_SSH_USER"@"$RUSEFI_SSH_SERVER" "tar -xzf - -C wiki3"
fi
[ $? -eq 0 ] || { echo "upload FAILED"; exit 1; }