Skip to content

Release

Release #65

Workflow file for this run

name: "Release"
on:
workflow_dispatch:
jobs:
release:
if: github.ref == 'refs/heads/stable'
runs-on: ubuntu-latest
steps:
- name: 🛒 Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: ⚙️ Setup dotnet 8.0.x
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: 🚀 Publish AtcWeb
run: dotnet publish src/AtcWeb/AtcWeb.csproj -c Release -o release --nologo
# # changes the base-tag in index.html from '/' to 'website' to match GitHub Pages repository subdirectory
# - name: 📝 Change base-tag in index.html from / to website
# run: sed -i 's/<base href="\/" \/>/<base href="\/website\/" \/>/g' release/wwwroot/index.html
# copy index.html to 404.html to serve the same file when a file is not found
- name: ⏩ Copy index.html to 404.html
run: cp release/wwwroot/index.html release/wwwroot/404.html
# add .nojekyll file to tell GitHub pages to not treat this as a Jekyll project. (Allow files and folders starting with an underscore)
- name: ➕ Add .nojekyll file
run: touch release/wwwroot/.nojekyll
- name: 📦 Commit wwwroot to GitHub Pages
uses: JamesIves/[email protected]
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: release/wwwroot