From 8ba84d02a12caccea1d2f923e8a4e9e6cb8ad372 Mon Sep 17 00:00:00 2001 From: Morten Nielsen Date: Tue, 19 Nov 2024 22:38:15 -0800 Subject: [PATCH] Update ghpages.yml --- .github/workflows/ghpages.yml | 51 +++++++++++------------------------ 1 file changed, 16 insertions(+), 35 deletions(-) diff --git a/.github/workflows/ghpages.yml b/.github/workflows/ghpages.yml index 0441078..effa6d6 100644 --- a/.github/workflows/ghpages.yml +++ b/.github/workflows/ghpages.yml @@ -52,39 +52,20 @@ jobs: .tools/docfx/docfx.exe build docs/docfx.json powershell -ExecutionPolicy ByPass -command "docs\FixApiRefLinks" -Path artifacts\docs_site\api\ - - name: Upload static files as artifact - id: deployment - uses: actions/upload-pages-artifact@v3 - with: - path: artifacts/docs_site - - deploy: - needs: build - permissions: - pages: write - id-token: write - environment: - name: github-pages - url: ${\{ steps.deployment.outputs.page_url }} - runs-on: ubuntu-latest - steps: - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v1 - #- name: Publish Documentation - # env: - # ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # BRANCH: gh-pages - # DOCSFOLDER: artifacts/docs_site - # shell: cmd - # run: | - # cd %DOCSFOLDER% - # git init - # git config --local user.name "%GITHUB_ACTOR%" - # git config --local user.email "%GITHUB_ACTOR%@users.noreply.github.com" - # git config --local core.autocrlf false - # git add . - # git commit -m "Auto-update doc from commit %GITHUB_SHA%" - # git push --force https://%ACCESS_TOKEN%@github.com/%GITHUB_REPOSITORY%.git master:%BRANCH% - # rmdir .git /S /Q + - name: Publish Documentation + env: + ACCESS_TOKEN: ${{ secrets.GH_PAT }} + BRANCH: gh-pages + DOCSFOLDER: artifacts/docs_site + shell: cmd + run: | + cd %DOCSFOLDER% + git init + git config --local user.name "%GITHUB_ACTOR%" + git config --local user.email "%GITHUB_ACTOR%@users.noreply.github.com" + git config --local core.autocrlf false + git add . + git commit -m "Auto-update doc from commit %GITHUB_SHA%" + git push --force https://%ACCESS_TOKEN%@github.com/%GITHUB_REPOSITORY%.git master:%BRANCH% + rmdir .git /S /Q