2019-12-04 23:02:44 +08:00
|
|
|
name: Publish Docs
|
2019-12-04 21:43:44 +08:00
|
|
|
|
2019-12-12 22:51:33 +08:00
|
|
|
env:
|
2020-03-05 12:17:50 +08:00
|
|
|
Version: 0.0.1
|
|
|
|
NUGET_API_KEY: ${{secrets.NUGET_API_KEY}}
|
2019-12-12 22:51:33 +08:00
|
|
|
|
2020-03-05 12:17:50 +08:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
2019-12-04 21:43:44 +08:00
|
|
|
|
|
|
|
jobs:
|
2020-03-05 12:17:50 +08:00
|
|
|
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
|
|
|
|
|
2020-03-07 17:00:14 +08:00
|
|
|
- uses: actions/setup-node@v1
|
|
|
|
with:
|
|
|
|
node-version: '10.x'
|
|
|
|
|
2020-03-05 12:17:50 +08:00
|
|
|
|
|
|
|
- name: Publish Docs to github pages
|
|
|
|
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
|
|
|
|
rm index.html
|
|
|
|
cp -r gh-pages/* gh-pages/.nojekyll ./
|
|
|
|
rm -r gh-pages
|
|
|
|
git init
|
|
|
|
git checkout -b gh-pages
|
|
|
|
git add -A
|
2020-03-09 22:25:21 +08:00
|
|
|
git commit -m "docs: Create build $GITHUB_RUN_ID"
|
2020-03-05 12:17:50 +08:00
|
|
|
git push -f https://ElderJames:$GH_PUSH_TOKEN@github.com/ElderJames/ant-design-blazor.git gh-pages
|
|
|
|
|
|
|
|
- name: Package Nightly Nuget
|
|
|
|
run: |
|
2020-03-07 19:23:03 +08:00
|
|
|
dotnet pack components/AntBlazor.csproj /p:PackageVersion=$Version-nightly-${GITHUB_RUN_ID} -c Release -o pack-${GITHUB_RUN_ID} --no-build --no-restore
|
2020-03-05 12:17:50 +08:00
|
|
|
|
|
|
|
- name: Publish to Nuget
|
|
|
|
run: |
|
2020-03-07 19:23:03 +08:00
|
|
|
dotnet nuget push pack-${GITHUB_RUN_ID}/*.nupkg -s https://api.nuget.org/v3/index.json -k $NUGET_API_KEY
|