converting to SFTP
This commit is contained in:
parent
9e2e4da91f
commit
1b22cc2a21
|
@ -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; }
|
||||
|
|
Loading…
Reference in New Issue