mirror of
https://gitee.com/dcren/openiddict-documentation.git
synced 2025-09-19 01:57:56 +08:00
Switch to GitHub Actions for CI/CD
This commit is contained in:
1
.github/FUNDING.yml
vendored
Normal file
1
.github/FUNDING.yml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
custom: https://paypal.me/kevinchalet
|
51
.github/workflows/build.yml
vendored
Normal file
51
.github/workflows/build.yml
vendored
Normal file
@@ -0,0 +1,51 @@
|
||||
name: build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ dev, rel/* ]
|
||||
tags: [ '*' ]
|
||||
pull_request:
|
||||
branches: [ dev, rel/* ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: ${{ matrix.os }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ windows-latest ]
|
||||
include:
|
||||
- os: windows-latest
|
||||
os_name: windows
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Setup DocFX
|
||||
shell: pwsh
|
||||
run: |
|
||||
nuget install docfx.console -Version 2.24.0
|
||||
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
|
||||
shell: pwsh
|
||||
run: |
|
||||
git config --global core.autocrlf false
|
||||
git config --global credential.helper store
|
||||
Add-Content "$env:USERPROFILE\.git-credentials" "https://${{ secrets.GH_PAGES_ACCESS_TOKEN }}:x-oauth-basic@github.com`n"
|
||||
git config --global user.email "OpenIddict Bot"
|
||||
git config --global user.name "32257313+openiddict-bot@users.noreply.github.com"
|
||||
git clone https://github.com/openiddict/openiddict-documentation.git -b gh-pages origin_site -q
|
||||
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
|
32
appveyor.yml
32
appveyor.yml
@@ -1,32 +0,0 @@
|
||||
environment:
|
||||
op_build_user: "OpenIddict Bot"
|
||||
op_build_user_email: "32257313+openiddict-bot@users.noreply.github.com"
|
||||
access_token:
|
||||
secure: Etj0OTTBw8r5cNT7jyc0y4LfQXhbtDwNngD2rVfitEj8h92XxN5HvSa7E/AnmXA+
|
||||
|
||||
build_script:
|
||||
- ps: |
|
||||
nuget install docfx.console -Version 2.24.0
|
||||
docfx.console.2.24.0\tools\docfx docfx.json
|
||||
if ($lastexitcode -ne 0)
|
||||
{
|
||||
throw [System.Exception] "docfx build failed with exit code $lastexitcode."
|
||||
}
|
||||
|
||||
after_build:
|
||||
- ps: |
|
||||
if(-Not $env:APPVEYOR_PULL_REQUEST_TITLE)
|
||||
{
|
||||
git config --global core.autocrlf false
|
||||
git config --global credential.helper store
|
||||
Add-Content "$env:USERPROFILE\.git-credentials" "https://$($env:access_token):x-oauth-basic@github.com`n"
|
||||
git config --global user.email $env:op_build_user_email
|
||||
git config --global user.name $env:op_build_user
|
||||
git clone https://github.com/openiddict/openiddict-documentation.git -b gh-pages origin_site -q
|
||||
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
|
||||
}
|
Reference in New Issue
Block a user