Update actions/checkout action to v4.2.2 #191
Workflow file for this run
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 CI/CD | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
env: | |
CONFIGURATION: Release | |
DOTNET_VERSION: 8.0.x | |
WORKING_DIRECTORY: TryAzureStaticBlazorApp | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: π Checkout | |
uses: actions/checkout@v4.2.2 | |
- name: β¨ Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: ${{ env.DOTNET_VERSION }} | |
- name: βοΈ Install wasm-tools | |
run: dotnet workload install wasm-tools | |
- name: π Restore | |
run: dotnet restore "${{ env.WORKING_DIRECTORY }}" | |
- name: π οΈ Build | |
run: dotnet build "${{ env.WORKING_DIRECTORY }}" --configuration ${{ env.CONFIGURATION }} --no-restore | |
- name: π¦ Publish | |
run: dotnet publish "${{ env.WORKING_DIRECTORY }}" --configuration ${{ env.CONFIGURATION }} --no-build -p:GHPages=true -p:GHPagesBase="/try-deploy-blazor-wasm-app/" --output publish | |
- name: π Deploy to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v4 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: publish/wwwroot | |
force_orphan: true |