Enable BUILD_DOC on build, output build directory #4
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
on: | |
push: | |
branches: | |
- master | |
- actions-stage | |
pull_request: | |
branches: | |
- master | |
jobs: | |
build: | |
name: Build Binaries & Docs | |
runs-on: windows-latest | |
strategy: | |
matrix: | |
build_type: [Debug, Release] | |
env: | |
artifact_name: smedley-${{ github.sha }}-${{ matrix.build_type }} | |
steps: | |
- name: Checkout Source | |
uses: actions/checkout@v4 | |
- name: Generate Build Files | |
run: | | |
cmake -DBUILD_DOC=ON -DCMAKE_GENERATOR_PLATFORM=WIN32 -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -G "Visual Studio 17 2022" -B build | |
dir build | |
- name: Build Objects | |
run: | | |
cmake --build build --config ${{ matrix.build_type }} -DBUILD_DOC=ON | |
- name: Prepare Artifact | |
run: | | |
mkdir -p dist && mkdir -p dist/plugins | |
cp build/smedley_kernel/${{ matrix.build_type }}/smedley_kernel.dll dist | |
cp -r build/smedley_kernel/docs dist/ | |
cp build/plugins/v2up/${{ matrix.build_type }}/v2up.dll dist/plugins | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ env.artifact_name }} | |
path: dist | |
deploy-docs: | |
name: Deploy Docs to Github Pages | |
runs-on: ubuntu-latest | |
needs: [build] | |
steps: | |
- name: Checkout Source | |
uses: actions/checkout@v4 | |
- name: Download Artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: smedley-${{ github.sha }}-Release | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./build/smedley_kernel/docs/html |