Deploy API to Ninjastorm #9
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Deploy API to Ninjastorm | |
| on: | |
| workflow_dispatch: | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| - name: Install Doxygen | |
| run: sudo apt-get update && sudo apt-get install -y doxygen | |
| - name: Generate Doxygen Documentation | |
| run: doxygen Doxyfile | |
| - name: List files after running Doxygen | |
| run: | | |
| echo "Files in ./doc/html after running Doxygen:" | |
| find ./doc/html -type f | |
| - name: Set up SSH | |
| uses: webfactory/[email protected] | |
| with: | |
| ssh-private-key: ${{ secrets.DEPLOY_NINJASTORM_KEY }} | |
| - name: Copy documentation to server | |
| run: | | |
| scp -o StrictHostKeyChecking=no -r ./doc/html/* [email protected]:/tmp/ | |
| ssh [email protected] "sudo rm -rf /var/www/html/windninjaapi/*" | |
| ssh [email protected] "sudo mv /tmp/* /var/www/html/windninjaapi/" | |