ant-design-blazor/.github/workflows/gh-pages.yml

49 lines
1.4 KiB
YAML
Raw Normal View History

2020-03-13 00:04:29 +08:00
name: Publish Docs
2019-12-04 21:43:44 +08:00
2019-12-12 22:51:33 +08:00
env:
Version: 0.0.1
NUGET_API_KEY: ${{secrets.NUGET_API_KEY}}
2019-12-12 22:51:33 +08:00
on:
push:
branches:
- master
2019-12-04 21:43:44 +08:00
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.102
- uses: actions/setup-node@v1
with:
node-version: '10.x'
2020-03-13 00:04:29 +08:00
- name: Publish Docs 🎉
run: |
npm install
2020-03-20 22:50:20 +08:00
cp -rf scripts/gh-pages/* scripts/gh-pages/.nojekyll scripts/gh-pages/.spa ./site/AntBlazor.Docs.ClientApp/wwwroot
dotnet build
2020-03-20 22:50:20 +08:00
dotnet publish -c Release -o cargo
2020-03-13 00:04:29 +08:00
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
ACCESS_TOKEN: ${{ secrets.GH_PUSH_TOKEN }}
BRANCH: gh-pages
2020-03-20 22:50:20 +08:00
FOLDER: cargo/wwwroot
2020-03-13 00:04:29 +08:00
2020-03-20 22:50:20 +08:00
- name: Package Nightly Nuget 📦
run: |
2020-03-13 00:04:29 +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-13 00:04:29 +08:00
- name: Publish to Nuget ✔
run: |
2020-03-13 00:04:29 +08:00
dotnet nuget push pack-$GITHUB_RUN_ID/*.nupkg -s https://api.nuget.org/v3/index.json -k $NUGET_API_KEY