Skip to content

Commit

Permalink
Ability to split workflow in build+pages
Browse files Browse the repository at this point in the history
  • Loading branch information
avillar committed Nov 14, 2023
1 parent 612c983 commit 8cddebe
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions .github/workflows/validate-and-process.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,18 @@ on:
type: string
description: Base URL for linking to GitHub content
default: https://github.com/${{github.repository}}/blob/${{github.ref_name}}/
ref:
type: string
description: Repository ref for checkout
default: ${{ github.ref_name }}
skip-build:
type: boolean
description: Whether to skip the BB build part of the process
default: false
skip-pages:
type: boolean
description: Whether to skip the GH pages build part of the process
default: false

permissions:
contents: write
Expand All @@ -64,9 +76,11 @@ jobs:
uses: actions/checkout@v3
with:
submodules: recursive
ref: ${{ inputs.ref }}
- name: Update submodules
run: git submodule update --recursive --remote
- name: OGC BB postprocess
if: ${{ !inputs.skip-build }}
uses: opengeospatial/bblocks-postprocess/full@v1
with:
register_file: ${{ inputs.register_file }}
Expand All @@ -80,12 +94,12 @@ jobs:
test_outputs_path: ${{ inputs.test_outputs_path }}
github_base_url: ${{ inputs.github_base_url }}
- name: Add & Commit
if: ${{ !endsWith(github.repository, '/bblock-template') }}
if: ${{ !endsWith(github.repository, '/bblock-template') && !inputs.skip-build }}
uses: EndBug/add-and-commit@v9
with:
message: Building blocks postprocessing
- name: Create GH Pages index
if: ${{ github.event.repository.has_pages }}
if: ${{ github.event.repository.has_pages && !inputs.skip-pages }}
shell: python
run: |
import json
Expand All @@ -112,13 +126,14 @@ jobs:
f.write(f'<li class="validation-{validation}"><tt>{identifier}</tt> - {name}</li>')
f.write('</ul><p style="margin-top:1em"><a href="${{ inputs.test_outputs_path }}/report.html">Validation report</a></p></body></html>')
- name: Setup Pages
if: ${{ github.event.repository.has_pages }}
if: ${{ github.event.repository.has_pages && !inputs.skip-pages }}
uses: actions/configure-pages@v3
- name: Upload artifacts
if: ${{ github.event.repository.has_pages && !inputs.skip-pages }}
uses: actions/upload-pages-artifact@v1
with:
path: .
- name: Deploy to GH Pages
if: ${{ github.event.repository.has_pages }}
if: ${{ github.event.repository.has_pages && !inputs.skip-pages }}
id: deployment
uses: actions/deploy-pages@v2

0 comments on commit 8cddebe

Please sign in to comment.