Skip to content

Commit

Permalink
removed index.html sed
Browse files Browse the repository at this point in the history
  • Loading branch information
danzuep committed Jan 23, 2024
1 parent 816e7a7 commit 72ec540
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions .github/workflows/_build-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,20 +57,19 @@ jobs:
- name: Restore project dependencies
run: |
dotnet restore ${{ env.PROJECT_PATH }}
dotnet publish ${{ env.PROJECT_PATH }} -c:Release -p:GHPages=true -p:Version=${{ inputs.project-version }} -o:${{ inputs.project-output }} --no-restore --nologo
dotnet publish ${{ env.PROJECT_PATH }} -c:Release -p:Version=${{ inputs.project-version }} -o:${{ inputs.project-output }} --no-restore --nologo
# "https://learn.microsoft.com/en-us/aspnet/core/blazor/host-and-deploy/webassembly?view=aspnetcore-8.0#github-pages"
# "To deploy folders starting with underscore, add an empty .nojekyll file to the Git branch."
- name: Add .nojekyll file
run: touch "${{ inputs.project-output }}/wwwroot/.nojekyll"

# changes the base-tag in index.html from '/' to 'BlazorGitHubPagesDemo' to match GitHub Pages repository subdirectory
- name: Change base-tag in index.html from / to the repository name
run: |
echo 'Get the repository name.'
repositoryName=$(basename '${{ github.repository }}')
echo "Repository name: $repositoryName"
sed -i 's/<base href="\/" \/>/<base href="\/$repositoryName\/" \/>/g' "${{ inputs.project-output }}/wwwroot/index.html"
# # changes the base-tag in index.html from '/' to match GitHub Pages repository subdirectory
# - name: Change base-tag in index.html from / to the repository name
# run: |
# repositoryName=$(basename '${{ github.repository }}')
# echo "Repository name: $repositoryName"
# sed -i 's/<base href="\/" \/>/<base href="\/$repositoryName\/" \/>/g' "${{ inputs.project-output }}/wwwroot/index.html"

- name: Setup Pages
uses: actions/configure-pages@v4
Expand Down

0 comments on commit 72ec540

Please sign in to comment.