Skip to content

Commit

Permalink
stitch public url together from repo variables
Browse files Browse the repository at this point in the history
  • Loading branch information
trappitsch committed Mar 22, 2024
1 parent 67f4b6c commit 5eaad9d
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,9 @@ jobs:
- name: Download and install Trunk binary
run: wget -qO- https://github.com/thedodd/trunk/releases/latest/download/trunk-x86_64-unknown-linux-gnu.tar.gz | tar -xzf-
- name: Build # build
# "${GITHUB_REPOSITORY#*/}" evaluates into the name of the repository
# using --public-url something will allow trunk to modify all the href paths like from favicon.ico to repo_name/favicon.ico .
# this is necessary for github pages where the site is deployed to username.github.io/repo_name and all files must be requested
# relatively as eframe_template/favicon.ico. if we skip public-url option, the href paths will instead request username.github.io/favicon.ico which
# will obviously return error 404 not found.
# run: ./trunk build --release --public-url "${GITHUB_REPOSITORY#*/}"
run: ./trunk build --release --public-url https://rims-code.github.io/crystal_angle/
run: ./trunk build --release --public-url $public_url
env:
public_url = "https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}"
- name: Deploy
uses: JamesIves/github-pages-deploy-action@v4
with:
Expand Down

0 comments on commit 5eaad9d

Please sign in to comment.