Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI build does not account for relative_url #1373

Closed
ReenigneArcher opened this issue Sep 12, 2024 · 2 comments · Fixed by #1374
Closed

CI build does not account for relative_url #1373

ReenigneArcher opened this issue Sep 12, 2024 · 2 comments · Fixed by #1374

Comments

@ReenigneArcher
Copy link
Contributor

I'm planning to attempt to update bootstrap (#1138 (comment)), but found a bug in the CI build. This is probably a super minor bug as I don't think the CI build is actually used for anything.

The generated _site does not use the relative_url (noticed because my fork is not at a repo named my_username.github.io)

I attempted to solve this by adding the github-pages gem, but did not have luck with that. ReenigneArcher#2 (maybe I missed something)

I was able to solve it by changing the workflow a little bit though. ReenigneArcher#3

@daattali
Copy link
Owner

The CI build is not realy used for much, other than to let me know that after every commit the theme still builds successfully.

Can you clarify what problem you're running into? Are you finding that URLs are not being built correctly? I create many jekyll sites that don't use the user.github.io pattern and they seem to work fine, so I'm curious what issue you're running into.

@ReenigneArcher
Copy link
Contributor Author

The problem is if you download the site artifacts from the CI build, the URLs are not correct.

For example if you have a repo named "test", instead of the urls being /test/assets/js/... they will just be /assets/js/... for example.

I suppose it's a minor issue since the CI isn't really used to publish the pages, and github has their magic workflow to do that. I only discovered the problem because I was trying to build and publish the site with GitHub workflows, as I wanted to use a custom plugin that the magic workflow doesn't allow (they have a plugin whitelist and there's no way to bypass it)

How can I reproduce the issue that you were having?

In my PR, take out the following lines, and inspect the artifacts.

      - name: Setup Pages
        id: configure-pages
        uses: actions/configure-pages@v5
      - name: Setup CI config
        run: |
          echo "---" > _config_ci.yml
          echo "baseurl: ${{ steps.configure-pages.outputs.base_path }}" >> _config_ci.yml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants