Update build.yml

This commit is contained in:
Kévin Chalet 2020-07-03 21:54:02 +02:00
parent 4236555780
commit 9e2c29756d

View File

@ -9,43 +9,24 @@ on:
jobs: jobs:
build: build:
name: ${{ matrix.os }} name: ubuntu-latest
runs-on: ${{ matrix.os }} runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
os: [ windows-latest ]
include:
- os: windows-latest
os_name: windows
steps: steps:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: Setup DocFX - name: Build documentation
shell: pwsh uses: nikeee/docfx-action@master
run: | with:
nuget install docfx.console -Version 2.24.0 args: docfx.json
docfx.console.2.24.0\tools\docfx docfx.json
if ($lastexitcode -ne 0)
{
throw [System.Exception] "docfx build failed with exit code $lastexitcode."
}
- name: Update the documentation pages - name: Deploy to GitHub Pages
shell: pwsh uses: JamesIves/github-pages-deploy-action@releases/v3
run: | with:
git config --global core.autocrlf false GITHUB_TOKEN: ${{ secrets.GH_PAGES_ACCESS_TOKEN }}
git config --global credential.helper store BRANCH: gh-pages
Add-Content "$env:USERPROFILE\.git-credentials" "https://${{ secrets.GH_PAGES_ACCESS_TOKEN }}:x-oauth-basic@github.com`n" FOLDER: _site
git config --global user.email "OpenIddict Bot" GIT_CONFIG_NAME: OpenIddict Bot
git config --global user.name "32257313+openiddict-bot@users.noreply.github.com" GIT_CONFIG_EMAIL: 32257313+openiddict-bot@users.noreply.github.com
git clone https://github.com/openiddict/openiddict-documentation.git -b gh-pages origin_site -q COMMIT_MESSAGE: Update the documentation pages
Copy-Item origin_site/.git _site -Recurse
CD _site
Remove-Item docfx.console.2.24.0 -Force -Recurse
git add -A 2>&1
git commit -m "Update the documentation pages" -q
git push origin gh-pages -q