File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1414 - name : Install and build npm
1515 run : |
1616 npm install
17- npm run publish
17+ npm run build
1818 working-directory : ./ui
1919 - name : Setup dotnet
2020 uses : actions/setup-dotnet@v1
2525 run : dotnet build ./api
2626 - name : Test
2727 run : dotnet test ./api/MyApp.Tests
28- - name : Deploy to GitHub Pages
29- run : |
30- cd ./api/MyApp/wwwroot
31- git init
32- git add -A
33- git config --local user.email "action@github.com"
34- git config --local user.name "GitHub Action"
35- git commit -m 'deploy'
36- - name : Force push to destination branch
37- uses : ad-m/github-push-action@v0.5.0
38- with :
39- github_token : ${{ secrets.GITHUB_TOKEN }}
40- branch : gh-pages
41- force : true
42- directory : ./api/MyApp/wwwroot
Original file line number Diff line number Diff line change 3535 context : .
3636 push : true
3737 tags : ghcr.io/${{ env.image_repository_name }}:${{ github.event.release.tag_name }}
38+
39+ - name : Deploy to GitHub Pages
40+ run : |
41+ cd ./api/MyApp/wwwroot
42+ git init
43+ git add -A
44+ git config --local user.email "action@github.com"
45+ git config --local user.name "GitHub Action"
46+ git commit -m 'deploy'
47+ - name : Force push to destination branch
48+ uses : ad-m/github-push-action@v0.5.0
49+ with :
50+ github_token : ${{ secrets.GITHUB_TOKEN }}
51+ branch : gh-pages
52+ force : true
53+ directory : ./api/MyApp/wwwroot
3854
3955 deploy_via_ssh :
4056 needs : push_to_registry
Original file line number Diff line number Diff line change 1- FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build
1+ FROM mcr.microsoft.com/dotnet/sdk:6.0-focal AS build
22WORKDIR /app
33
4- COPY . .
4+ COPY ./api .
55RUN dotnet restore
66
77WORKDIR /app/MyApp
88RUN dotnet publish -c release -o /out --no-restore
99
10- FROM mcr.microsoft.com/dotnet/aspnet:5.0 AS runtime
10+ FROM mcr.microsoft.com/dotnet/aspnet:6.0-focal AS runtime
1111WORKDIR /app
1212COPY --from=build /out .
1313ENTRYPOINT ["dotnet" , "MyApp.dll" ]
You can’t perform that action at this time.
0 commit comments