Skip to content

Update build-repository.yml #7

Update build-repository.yml

Update build-repository.yml #7

name: Build Repository
on:
workflow_dispatch:
push:
branches: main
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true
env:
publishDirectory: publish
jobs:
build-listing:
name: build-listing
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
# Install .NET SDK
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x
- name: Install .NET WebAssembly Tools
run: dotnet workload install wasm-tools
- uses: actions/checkout@v4 # check out this repo
- name: Restore Cache
uses: actions/cache@v4
with:
path: |
.nuke/temp
~/.nuget/packages
key: ${{ runner.os }}-${{ hashFiles('**/global.json', '**/*.csproj') }}
- name: Publish Pages
shell: bash
run: ./build.sh --target Publish --output ${{env.publishDirectory}}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ${{env.publishDirectory}}
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4