From 77aa856b60834d7fa530b2d8f7f1bd190b6d1d34 Mon Sep 17 00:00:00 2001 From: Milad Raeisi <6504337+miladsoft@users.noreply.github.com> Date: Thu, 8 Feb 2024 19:26:15 +0400 Subject: [PATCH] Create gh-pages.yml (#31) --- .github/workflows/gh-pages.yml | 41 ++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/gh-pages.yml diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml new file mode 100644 index 00000000..3dd14fd6 --- /dev/null +++ b/.github/workflows/gh-pages.yml @@ -0,0 +1,41 @@ +name: gh-pages + +on: + push: + branches: + - main + +permissions: + contents: write +jobs: + build: + + concurrency: ci-${{ github.ref }} + runs-on: ubuntu-latest + + env: + PROJECT_PATH: "src/Angor/Server/Angor.Server" + OUTPUT_PATH: "Output" + BUILD_CONFIGURATION: "Release" + + steps: + - uses: actions/checkout@v2 + - name: Setup .NET Core + uses: actions/setup-dotnet@v1 + with: + dotnet-version: 7.0.x + + - name: Publish (Angor) + run: dotnet publish ${{env.PROJECT_PATH}} -f net7.0 --configuration ${{env.BUILD_CONFIGURATION}} --output ${{env.OUTPUT_PATH}} + + - name: Copy index.html to 404.html + run: cp ${{env.OUTPUT_PATH}}/wwwroot/index.html ${{env.OUTPUT_PATH}}/wwwroot/404.html + + - name: Add .nojekyll file + run: touch ${{env.OUTPUT_PATH}}/wwwroot/.nojekyll + + - name: Deploy to Github Pages + uses: JamesIves/github-pages-deploy-action@v4 + with: + branch: gh-pages + folder: ${{env.OUTPUT_PATH}}/wwwroot \ No newline at end of file