diff --git a/CV.sln b/CV.sln index 83893b1..91c83fa 100644 --- a/CV.sln +++ b/CV.sln @@ -5,6 +5,13 @@ VisualStudioVersion = 17.4.33103.184 MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CV", "CV\CV.csproj", "{78D0F98D-D707-49CF-91B0-4F78619FED42}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".github", ".github", "{97BE41DE-A512-42B1-BF73-911861725EEE}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{A434BC1F-9A88-4D60-8EE4-2C64F4808420}" + ProjectSection(SolutionItems) = preProject + main.yml = main.yml + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -19,6 +26,9 @@ Global GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {A434BC1F-9A88-4D60-8EE4-2C64F4808420} = {97BE41DE-A512-42B1-BF73-911861725EEE} + EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {63951C52-0899-4BA8-9A43-B4E11FFCF677} EndGlobalSection diff --git a/main.yml b/main.yml new file mode 100644 index 0000000..2135c04 --- /dev/null +++ b/main.yml @@ -0,0 +1,31 @@ +name: CV +env: + PUBLISH_DIR: bin/Release/net7.0/publish/wwwroot +# Controls when the action will run +on: + push: + branches: [ master ] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Publish app + run: dotnet publish -c Release + + - name: Rewrite base href + uses: SteveSandersonMS/ghaction-rewrite-base-href@v1 + with: + html_path: ${{ env.PUBLISH_DIR }}/index.html + base_href: /CV/ + + - name: GitHub Pages + if: success() + uses: crazy-max/ghaction-github-pages@v1.5.1 + with: + target_branch: gh-pages + build_dir: ${{ env.PUBLISH_DIR }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file