Use SSH for Doxygen (#3386)

* install sshpass and change var names

* convert doxygen script

* no stricthostkeychecking

* change secrets
This commit is contained in:
David Holdeman 2021-10-21 18:15:25 -05:00 committed by GitHub
parent b750755369
commit f489e6a3c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 7 deletions

View File

@ -16,16 +16,16 @@ jobs:
- name: Install prerequisite software - name: Install prerequisite software
run: | run: |
sudo apt-get update sudo apt-get update
sudo apt-get install doxygen graphviz ncftp sudo apt-get install doxygen graphviz sshpass
- name: Set FTP variables - name: Set FTP variables
env: env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true' ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
run: | run: |
if [ "${{github.ref}}" = "refs/heads/master" ]; then if [ "${{github.ref}}" = "refs/heads/master" ]; then
echo "::set-env name=RUSEFI_FTP_SERVER::${{secrets.RUSEFI_FTP_SERVER}}"; echo "::set-env name=RUSEFI_SSH_SERVER::${{secrets.RUSEFI_SSH_SERVER}}";
echo "::set-env name=RUSEFI_DOXYGEN_FTP_USER::${{secrets.RUSEFI_DOXYGEN_FTP_USER}}"; echo "::set-env name=RUSEFI_DOXYGEN_SSH_USER::${{secrets.RUSEFI_DOXYGEN_SSH_USER}}";
echo "::set-env name=RUSEFI_DOXYGEN_FTP_PASS::${{secrets.RUSEFI_DOXYGEN_FTP_PASS}}"; echo "::set-env name=RUSEFI_DOXYGEN_SSH_PASS::${{secrets.RUSEFI_DOXYGEN_SSH_PASS}}";
fi fi
- name: Generate documentation - name: Generate documentation

View File

@ -5,11 +5,10 @@ cd firmware
doxygen || { echo "doxygen run FAILED"; exit 1; } doxygen || { echo "doxygen run FAILED"; exit 1; }
# http://www.ncftp.com/download/
# actually Cygwin http://rusefi.com/wiki/index.php?title=Internal:Software:Build_Server # actually Cygwin http://rusefi.com/wiki/index.php?title=Internal:Software:Build_Server
cd ../doxygen cd ../doxygen
if [ -n "$RUSEFI_FTP_SERVER" ]; then if [ -n "$RUSEFI_SSH_SERVER" ]; then
echo "Uploading Doxygen" echo "Uploading Doxygen"
ncftpput -R -z -m -V -u "$RUSEFI_DOXYGEN_FTP_USER" -p "$RUSEFI_DOXYGEN_FTP_PASS" "$RUSEFI_FTP_SERVER" / html tar -czf - html | sshpass -p "$RUSEFI_DOXYGEN_SSH_PASS" ssh -o StrictHostKeyChecking=no "$RUSEFI_DOXYGEN_SSH_USER"@"$RUSEFI_SSH_SERVER" "tar -xzf -"
fi fi
[ $? -eq 0 ] || { echo "upload FAILED"; exit 1; } [ $? -eq 0 ] || { echo "upload FAILED"; exit 1; }