diff --git a/.gitea/workflows/deploy-pages.yml b/.gitea/workflows/deploy-pages.yml new file mode 100644 index 000000000..fe92c2ff2 --- /dev/null +++ b/.gitea/workflows/deploy-pages.yml @@ -0,0 +1,49 @@ +name: Build and Deploy Documentation + +on: + push: + branches: + - master + workflow_dispatch: + +jobs: + build-and-deploy: + runs-on: ubuntu-latest + container: + image: container.psi.ch/linux-infra/documentation + steps: + - name: Install node + run: | + apt-get update + apt-get install -y nodejs git + + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Install system dependencies + run: | + apt-get update + apt-get install -y doxygen + + - name: Build musrfit-tech-docu + run: | + cd doc + mkdir technical + doxygen musrfit_dox.cfg + doxygen musredit_qt5_dox.cfg + doxygen mupp_qt5_dox.cfg + + - name: Configure Git + run: | + git config --global user.name "Gitea Actions" + git config --global user.email "actions@gitea.local" + + - name: Push to gitea-pages branch + run: | + git checkout --orphan gitea-pages + git reset --hard + cp -r ./technical/html/* . + git add . + git commit -m "Deploy site" + git push -f https://${{secrets.GITHUB_TOKEN}}@gitea.psi.ch/${{ github.repository }}.git gitea-pages +