-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
move publish to gh-pages to use same assets as Docker container
- Loading branch information
Showing
3 changed files
with
20 additions
and
19 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ jobs: | |
- name: Install and build npm | ||
run: | | ||
npm install | ||
npm run publish | ||
npm run build | ||
working-directory: ./ui | ||
- name: Setup dotnet | ||
uses: actions/setup-dotnet@v1 | ||
|
@@ -25,18 +25,3 @@ jobs: | |
run: dotnet build ./api | ||
- name: Test | ||
run: dotnet test ./api/MyApp.Tests | ||
- name: Deploy to GitHub Pages | ||
run: | | ||
cd ./api/MyApp/wwwroot | ||
git init | ||
git add -A | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "GitHub Action" | ||
git commit -m 'deploy' | ||
- name: Force push to destination branch | ||
uses: ad-m/[email protected] | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
branch: gh-pages | ||
force: true | ||
directory: ./api/MyApp/wwwroot |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,6 +35,22 @@ jobs: | |
context: . | ||
push: true | ||
tags: ghcr.io/${{ env.image_repository_name }}:${{ github.event.release.tag_name }} | ||
|
||
- name: Deploy to GitHub Pages | ||
run: | | ||
cd ./api/MyApp/wwwroot | ||
git init | ||
git add -A | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "GitHub Action" | ||
git commit -m 'deploy' | ||
- name: Force push to destination branch | ||
uses: ad-m/[email protected] | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
branch: gh-pages | ||
force: true | ||
directory: ./api/MyApp/wwwroot | ||
|
||
deploy_via_ssh: | ||
needs: push_to_registry | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build | ||
FROM mcr.microsoft.com/dotnet/sdk:6.0-focal AS build | ||
WORKDIR /app | ||
|
||
COPY . . | ||
COPY ./api . | ||
RUN dotnet restore | ||
|
||
WORKDIR /app/MyApp | ||
RUN dotnet publish -c release -o /out --no-restore | ||
|
||
FROM mcr.microsoft.com/dotnet/aspnet:5.0 AS runtime | ||
FROM mcr.microsoft.com/dotnet/aspnet:6.0-focal AS runtime | ||
WORKDIR /app | ||
COPY --from=build /out . | ||
ENTRYPOINT ["dotnet", "MyApp.dll"] |