Skip to content

Commit

Permalink
fix(projects): main urls should not use project base path
Browse files Browse the repository at this point in the history
  • Loading branch information
ReenigneArcher committed Jan 7, 2025
1 parent b0df8d5 commit 46f45ef
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions .github/workflows/jekyll-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,16 @@ on:
required: false
default: 'master'
type: string
base_url:
description: |
Base URL of the site. With default option, the root will come from LizardByte.github.io (app.lizardbyte.dev).
This is useful to re-use the theme config and many assets from that site; but requires you to prefix other
assets with `/<RepoName>` (e.g. `/MyRepo/assets/img/my-image.png`).
If this is set to `_auto`, the workflow will determine this value automatically.
required: false
default: ''
type: string
secrets:
GH_BOT_EMAIL:
description: 'Email address of the bot account'
Expand Down Expand Up @@ -167,25 +177,33 @@ jobs:
- name: Setup Pages
id: configure-pages
if: ${{ inputs.base_url == '_auto' }}
uses: actions/configure-pages@v5

- name: Setup CI config
run: |
config_file="_config_ci.yml"
echo "---" > $config_file
echo "baseurl: ${{ steps.configure-pages.outputs.base_path }}" >> $config_file
if [ "${{ inputs.base_url }}" == '_auto' ]; then
echo "baseurl: '${{ steps.configure-pages.outputs.base_path }}'" >> $config_file
echo "repository: '${{ github.repository }}'" >> $config_file
else
echo "baseurl: '${{ inputs.base_url }}'" >> $config_file
echo "repository: 'LizardByte/LizardByte.github.io'" >> $config_file
fi
cat $config_file
- name: Build site
env:
JEKYLL_ENV: production
JEKYLL_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PAGES_REPO_NWO: ${{ github.repository }}
# PAGES_REPO_NWO: ${{ github.repository }}
run: |
# if inputs.config_file exists
config_files="_config_ci.yml,_config_theme.yml"
if [ -e "${{ inputs.config_file }}" ]; then
cat ${{ inputs.config_file }}
config_files="${config_files},${{ inputs.config_file }}"
fi
Expand Down

0 comments on commit 46f45ef

Please sign in to comment.