Update build_docs.yml #7
This file contains 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: Documentation Build | |
on: | |
push: | |
branches: | |
- develop | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | |
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | |
concurrency: | |
group: "pages" | |
cancel-in-progress: false | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
- name: Add MSBuild to PATH | |
uses: microsoft/[email protected] | |
- name: Install 7-Zip | |
run: | | |
Invoke-WebRequest -Uri https://www.7-zip.org/a/7z1900-x64.exe -OutFile 7z.exe | |
Start-Process -Wait -FilePath 7z.exe | |
Remove-Item -Force 7z.exe | |
- name: Extract 3rdparty.zip | |
run: | | |
Start-Process -Wait -FilePath 'C:\Program Files\7-Zip\7z.exe' -ArgumentList "x -y .\development\3rdparty.zip -o.\development\" | |
- name: Build Documentation | |
run: msbuild /p:Configuration=Release documentation\Cpacs_doc_project.shfbproj | |
- name: Package HTML Docs | |
run: 7z a -tzip .\build\doc\htmlDocs.zip .\build\doc\* | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: documentation-artifacts | |
path: | | |
.\build\doc\*.chm | |
.\build\doc\htmlDocs.zip | |
- name: Move HTML Docs to Pages Directory | |
run: | | |
mv .\build\doc\* . | |
deploy: | |
needs: build | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Pages | |
uses: actions/configure-pages@v3 | |
with: | |
branch: gh-pages # Oder die Ziel-Branch, die du für GitHub Pages verwendest | |
folder: . # Ordner, in dem die GitHub Pages-Inhalte liegen | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v2 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} # Token für die Berechtigung zur Veröffentlichung |