Skip to content

Commit

Permalink
Update build style for pull requests and main branch
Browse files Browse the repository at this point in the history
  • Loading branch information
hansec committed Feb 27, 2024
1 parent d85558e commit 80a5ebd
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/website.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,14 @@ jobs:
- name: Create build dir
run: mkdir build_docs

- name: Configure OFT documentation
- name: Configure OFT documentation (nightly)
if: github.ref != 'ref/head/gh-pages'
shell: bash
working-directory: build_docs
run: cmake -DOFT_BUILD_DOCS:BOOL=ON -DOFT_DOCS_ONLY:BOOL=ON -DOFT_PACKAGE_NIGHTLY:BOOL=ON ../src

- name: Configure OFT documentation (deploy)
if: github.ref == 'ref/head/gh-pages'
shell: bash
working-directory: build_docs
run: cmake -DOFT_BUILD_DOCS:BOOL=ON -DOFT_DOCS_ONLY:BOOL=ON -DOFT_PACKAGE_NIGHTLY:BOOL=OFF ../src
Expand All @@ -65,15 +72,15 @@ jobs:
done
- name: Upload actions artifact
if: github.event_name == 'pull_request'
if: github.ref != 'ref/head/gh-pages'
uses: actions/upload-artifact@v4
with:
name: pull_${{ github.event.pull_request.number }}-website
path: _site/
overwrite: true

- name: Upload pages artifact
if: github.event_name != 'pull_request'
if: github.ref == 'ref/head/gh-pages'
uses: actions/upload-pages-artifact@v3

# Deployment job
Expand Down

0 comments on commit 80a5ebd

Please sign in to comment.