Use SSH for Doxygen (#3386)
* install sshpass and change var names * convert doxygen script * no stricthostkeychecking * change secrets
This commit is contained in:
parent
b750755369
commit
f489e6a3c9
|
@ -16,16 +16,16 @@ jobs:
|
|||
- name: Install prerequisite software
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install doxygen graphviz ncftp
|
||||
sudo apt-get install doxygen graphviz sshpass
|
||||
|
||||
- name: Set FTP variables
|
||||
env:
|
||||
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_DOXYGEN_SSH_USER::${{secrets.RUSEFI_DOXYGEN_SSH_USER}}";
|
||||
echo "::set-env name=RUSEFI_DOXYGEN_SSH_PASS::${{secrets.RUSEFI_DOXYGEN_SSH_PASS}}";
|
||||
fi
|
||||
|
||||
- name: Generate documentation
|
||||
|
|
|
@ -5,11 +5,10 @@ cd firmware
|
|||
|
||||
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
|
||||
cd ../doxygen
|
||||
if [ -n "$RUSEFI_FTP_SERVER" ]; then
|
||||
if [ -n "$RUSEFI_SSH_SERVER" ]; then
|
||||
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
|
||||
[ $? -eq 0 ] || { echo "upload FAILED"; exit 1; }
|
||||
|
|
Loading…
Reference in New Issue