2024-01-10 00:56:08 +01:00
|
|
|
name: Docs
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
2024-01-10 00:57:35 +01:00
|
|
|
- main
|
2024-01-10 00:56:08 +01:00
|
|
|
jobs:
|
|
|
|
doxygen:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Install Doxygen
|
2024-01-10 01:02:40 +01:00
|
|
|
run: |
|
|
|
|
# doxygen on apt is too old
|
|
|
|
curl -L https://www.doxygen.nl/files/doxygen-1.10.0.linux.bin.tar.gz | tar xz
|
|
|
|
sudo mv doxygen-*/bin/doxy* /usr/local/bin
|
2024-01-10 00:56:08 +01:00
|
|
|
- name: Generate docs
|
|
|
|
run: doxygen
|
|
|
|
# deploy to gh pages if repo is pmret/papermario
|
|
|
|
- name: Deploy to gh-pages
|
|
|
|
if: github.repository != 'pmret/papermario'
|
|
|
|
uses: peaceiris/actions-gh-pages@v3
|
|
|
|
with:
|
|
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
2024-01-10 01:11:24 +01:00
|
|
|
publish_dir: ./docs/doxygen/html
|
2024-01-10 00:56:08 +01:00
|
|
|
- name: Deploy to papermar.io
|
|
|
|
if: github.repository == 'pmret/papermario'
|
|
|
|
uses: appleboy/scp-action@master
|
|
|
|
with:
|
|
|
|
host: ${{ secrets.HOST }}
|
|
|
|
username: ${{ secrets.USERNAME }}
|
|
|
|
password: ${{ secrets.PASSWORD }}
|
2024-01-10 01:29:18 +01:00
|
|
|
source: docs/doxygen/html/
|
|
|
|
target: "/var/www/papermar.io/html/docs/"
|
|
|
|
strip_components: 3
|