CD #8
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: CD | |
on: | |
workflow_dispatch: | |
env: | |
APP_CREDENTIALS_PATH: '${{ github.workspace }}\Private\Constants.cs' | |
jobs: | |
deploy: | |
name: Deploy | |
runs-on: self-hosted | |
defaults: | |
run: | |
shell: pwsh | |
steps: | |
- name: Install PowerShell | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y powershell | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Update installed .NET workloads | |
run: | | |
dotnet workload update | |
- name: Install the .NET Aspire workload | |
run: | | |
dotnet workload install aspire | |
- name: Restore dependencies | |
run: | | |
dotnet restore | |
- name: Save Base64 credentials into a file | |
shell: pwsh | |
run: | | |
$bytes = [Convert]::FromBase64String($env:CREDENTIALS) | |
[IO.File]::WriteAllBytes($env:APP_CREDENTIALS_PATH, $bytes) | |
env: | |
CREDENTIALS: '${{ secrets.APICREDENTIALS }}' | |
- name: Run .NET Aspire AppHost | |
run: | | |
dotnet run --project AppHost/Republic.AppHost.csproj |