GitHub Pages に配置する GitHub Actions Workflow を追加 #1
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 | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
# Checkout the code | |
- uses: actions/checkout@v4 | |
# Install .NET SDK | |
- name: Setup .NET SDK | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8.0.x | |
- name: Install .NET WebAssembly Tools | |
run: dotnet workload install wasm-tools | |
# Setup NuGet package source | |
- name: Setup NuGet package source | |
run: dotnet nuget add source "https://packages.infragistics.com/nuget/licensed" | |
-n Infragistics | |
-u api | |
-p ${{ secrets.ACCESSTOKEN_FOR_NUGET }} | |
--store-password-in-clear-text | |
# Add the "Publish SPA for GitHub Pages" package | |
- name: Add the "Publish SPA for GitHub Pages" package | |
run: dotnet add package PublishSPAforGitHubPages.Build | |
# Publish the site | |
- name: Publish | |
run: dotnet publish KB10214_IgbGrid_Localize.csproj -c Release -o publish -p GHPages=true | |
# Clean up package source | |
- name: Clean up package source | |
run: dotnet nuget remove source Infragistics | |
# Deploy the site | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v4 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: publish/wwwroot | |
force_orphan: true |