Skip to content

Commit

Permalink
Use GH pages as base_url if enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
avillar committed Jul 31, 2023
1 parent df9dc9a commit 5a3fd70
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion full/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ inputs:
default: build/generateddocs
base_url:
description: Base URL to use for asset linkage
default: https://raw.githubusercontent.com/${{github.repository}}/${{github.ref_name}}
default: |
${{ github.event.repository.has_pages
&& format('https://{0}.github.io/{1}', github.repository_owner, github.event.repository.name)
|| format('https://raw.githubusercontent.com/{0}/{1}', github.repository, github.ref_name) }}
fail_on_error:
description: Whether to fail on errors
default: 'false'
Expand Down
5 changes: 4 additions & 1 deletion postprocess/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ inputs:
default: build/generateddocs
base_url:
description: Base URL to use for asset linkage
default: https://raw.githubusercontent.com/${{github.repository}}/${{github.ref_name}}
default: |
${{ github.event.repository.has_pages
&& format('https://{0}.github.io/{1}', github.repository_owner, github.event.repository.name)
|| format('https://raw.githubusercontent.com/{0}/{1}', github.repository, github.ref_name) }}
fail_on_error:
description: Whether to fail on errors
default: 'false'
Expand Down

0 comments on commit 5a3fd70

Please sign in to comment.