Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 8 additions & 14 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
dotnet-version: 8.0.x
- name: Publish
run: dotnet publish dotpaste/dotpaste.csproj -c Release -o build
- name: Upload to server
uses: ErSoul/scp_uploader@v1.0
with:
host: ${{vars.SSH_HOST}}
username: ${{secrets.SSH_USER}}
key: ${{secrets.SSH_KEY}}
source: ./build/*
target: /srv/dotpaste
after: systemctl --user restart dotpaste
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Publish
run: |
dotnet publish --os linux --arch x64 /t:PublishContainer -p ContainerTag=$(git describe --tags --always)
2 changes: 2 additions & 0 deletions dotpaste/dotpaste.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,7 @@

<PropertyGroup>
<ContainerBaseImage>mcr.microsoft.com/dotnet/aspnet:8.0-alpine-composite</ContainerBaseImage>
<ContainerRegistry>ghcr.io</ContainerRegistry>
<ContainerRepository>ErSoul/dotpaste</ContainerRepository>
</PropertyGroup>
</Project>