fixed screenshots not appearing #22
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: GitHub Pages Deploy | |
on: | |
push: | |
branches: | |
- alfa | |
paths-ignore: | |
- '.vscode/**' | |
- '.github/**' | |
- 'LICENSE' | |
- '**.md' | |
- '**.gitignore' | |
- '**.gitattributes' | |
workflow_dispatch: | |
jobs: | |
deployment: | |
if: ${{ github.repository == 'Valery-a/roguelike-dungeon-game' && github.ref == 'refs/heads/alfa' }} | |
runs-on: ubuntu-latest | |
timeout-minutes: 60 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 7.0.x | |
- name: dotnet publish | |
run: dotnet publish Valery-s-WebDungeon/Valery-s-WebDungeon.csproj --configuration Release | |
- name: index.html base tag | |
run: sed -i 's/<base href="\/" \/>/<base href="\/roguelike-dungeon-game\/" \/>/g' Valery-s-WebDungeon/bin/Release/net7.0/publish/wwwroot/index.html | |
- name: 404.html | |
run: sed -i 's/\/?p=\//\/roguelike-dungeon-game\/?p=\//g' Valery-s-WebDungeon/bin/Release/net7.0/publish/wwwroot/404.html | |
- name: .nojekyll | |
run: touch Valery-s-WebDungeon/bin/Release/net7.0/publish/wwwroot/.nojekyll | |
- name: CODEOWNERS | |
run: echo "* @Valery-a" > Valery-s-WebDungeon/bin/Release/net7.0/publish/wwwroot/CODEOWNERS | |
- name: git config | |
run: | | |
git config --global user.name "${GITHUB_ACTOR}" | |
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com" | |
- name: force push to github-pages | |
run: | | |
cd Valery-s-WebDungeon/bin/Release/net7.0/publish/wwwroot | |
git init --initial-branch=github-pages | |
git add . | |
git commit -m 'push to github-pages' | |
echo "git push --force ..." | |
git push --force "https://${{ secrets.VALERY_DUNGEON_SECRET }}@github.com/${GITHUB_REPOSITORY}.git" github-pages:github-pages |