56 lines
1.5 KiB
YAML
56 lines
1.5 KiB
YAML
name: Doxygen
|
|
on: [push]
|
|
|
|
jobs:
|
|
Doxygen:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout the repository
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: '3.x'
|
|
|
|
- name: Install Doxygen
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y doxygen
|
|
|
|
- name: Generate Doxygen Documentation
|
|
run: |
|
|
doxygen Doxyfile
|
|
|
|
- name: Move `/docs/html/` contents to a new branch
|
|
run: |
|
|
# Ensure a clean Git state
|
|
git config --global user.name "${{ gitea.actor }}"
|
|
git config --global user.email "${{ gitea.actor }}@example.com"
|
|
git fetch origin
|
|
git checkout --orphan web
|
|
git reset --hard
|
|
git clean -fdx
|
|
|
|
# Ensure docs/html exists and copy files
|
|
if [ -d "docs/html" ]; then
|
|
mkdir -p temp_html
|
|
cp -r docs/html/* temp_html/ || exit 1
|
|
mv temp_html/* .
|
|
rmdir temp_html
|
|
else
|
|
echo "Directory docs/html/ does not exist. Exiting."
|
|
exit 1
|
|
fi
|
|
|
|
git add .
|
|
git commit -m "Update web branch with documentation"
|
|
git push origin web --force
|
|
|
|
- name: Execute Pterodactyl Power Action
|
|
uses: D3OXY/pterodactyl-power@V1
|
|
with:
|
|
PANEL_URL: "https://pte.nucs.me"
|
|
API_KEY: ${{ secrets.PTE_API}}
|
|
SERVER_ID: ${{ secrets.PTE_SERVER }}
|
|
POWER_ACTION: "RESTART" |