Skip to content

update pipeline versions #58

update pipeline versions

update pipeline versions #58

Workflow file for this run

name: Deploy to GitHub Page
# Controls when the action will run
on:
push:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '7.x.x'
- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v3.0.0
with:
versionSpec: '5.x'
- name: Execute GitVersion
uses: gittools/actions/gitversion/execute@v3.0.0
with:
additionalArguments: '/updateprojectfiles /showconfig'
- name: Test application
run: dotnet test tests/NameBadgeAutomater.Tests/NameBadgeAutomater.Tests.csproj -c Release
# base href url value should be changed so that resources like CSS and scripts can load properly.
- name: Rewrite base href
if: success()
uses: SteveSandersonMS/ghaction-rewrite-base-href@v1
with:
html_path: src/NameBadgeAutomater/wwwroot/index.html
base_href: /name-badge-automater/
- name: Publish application
run: dotnet publish src/NameBadgeAutomater/NameBadgeAutomater.csproj -c Release
# 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 src/NameBadgeAutomater/bin/Release/net7.0/publish/wwwroot/.nojekyll
- name: Commit to GitHub pages Repo
if: success()
uses: crazy-max/ghaction-github-pages@v4
with:
target_branch: gh-pages
build_dir: src/NameBadgeAutomater/bin/Release/net7.0/publish/wwwroot
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}