Update submodule to latest #36
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: π Deploy to GitHub Pages | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ main, dev ] | |
paths: src/** | |
pull_request: | |
branches: [ main ] | |
paths: src/** | |
# # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
# permissions: | |
# contents: read | |
# pages: write | |
# id-token: write | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
# defaults: | |
# run: | |
# working-directory: src | |
steps: | |
- name: π Checkout | |
uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Setup .NET 7.0 | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: '7.0.x' | |
# include-prerelease: true | |
- name: β¬οΈ Restore dependencies | |
working-directory: ./src | |
run: dotnet restore | |
- name: π¨ Build | |
working-directory: ./src | |
run: dotnet build --no-restore | |
- name: π¦ Run | |
working-directory: ./src | |
run: dotnet run | |
# # changes the base-tag in index.html from '/' to 'statiqweb-example' to match GitHub Pages repository subdirectory | |
# - name: Change base-tag in index.html from / to statiqweb-example | |
# run: sed -i 's/<base href="\/" \/>/<base href="\/statiqweb-example\/" \/>/g' ./src/output/index.html | |
# - name: Add base tag | |
# working-directory: ./src | |
# run: | | |
# sed '11 a\ | |
# <base href="\/statiqweb-example\/" \/> | |
# ' output/index.html | |
# https://github.com/marketplace/actions/github-pages-action | |
- name: π Deploy | |
uses: peaceiris/[email protected] | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./src/output |