2019-12-04 23:02:44 +08:00
|
|
|
name: Publish Docs
|
2019-12-04 21:43:44 +08:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
- name: Setup .NET Core
|
|
|
|
uses: actions/setup-dotnet@v1
|
|
|
|
with:
|
|
|
|
dotnet-version: 3.1.100
|
|
|
|
- name: Generate build number
|
|
|
|
uses: einaregilsson/build-number@v2
|
|
|
|
with:
|
|
|
|
token: ${{secrets.github_token}}
|
2019-12-04 23:02:44 +08:00
|
|
|
- name: Publish Docs to github pages
|
2019-12-04 21:43:44 +08:00
|
|
|
env:
|
|
|
|
GH_PUSH_TOKEN: ${{secrets.GH_PUSH_TOKEN}}
|
|
|
|
run: |
|
|
|
|
git config --global user.name 'ElderJames'
|
|
|
|
git config --global user.email 'shunjiey@hotmail.com'
|
|
|
|
dotnet publish -c Release -o tmp
|
|
|
|
cd tmp/AntBlazor.Docs.ClientApp/dist
|
2019-12-04 23:02:44 +08:00
|
|
|
rm index.html
|
|
|
|
cp -r gh-pages/* gh-pages/.nojekyll ./
|
|
|
|
rm -r gh-pages
|
2019-12-04 21:43:44 +08:00
|
|
|
git init
|
|
|
|
git checkout -b gh-pages
|
|
|
|
git add -A
|
|
|
|
git commit -m "Create build $BUILD_NUMBER"
|
|
|
|
git push -f https://ElderJames:$GH_PUSH_TOKEN@github.com/ElderJames/ant-design-blazor.git gh-pages
|