Skip to content

Update build_docs.yml #13

Update build_docs.yml

Update build_docs.yml #13

Workflow file for this run

name: Build documentation
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@v3
with:
name: documentation-artifacts
path: |
.\build\doc\*.chm
.\build\doc\htmlDocs.zip
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
folder: .
- name: Download html zip
uses: actions/download-artifact@v3
with:
name: documentation-artifacts
- name: Extract HTML Docs
run: |
7z x -y documentation-artifacts/htmlDocs.zip -ohtmlDocs
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}