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:
|
2020-03-28 00:02:11 +08:00
|
|
|
Version: 0.1.0
|
2020-03-05 12:17:50 +08:00
|
|
|
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:
|
2020-05-25 13:19:54 +08:00
|
|
|
- 'ant-design-blazor/master'
|
2019-12-04 21:43:44 +08:00
|
|
|
|
|
|
|
jobs:
|
2020-05-25 13:19:54 +08:00
|
|
|
publish-and-deploy:
|
2020-03-05 12:17:50 +08:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
2020-04-28 13:39:41 +08:00
|
|
|
- name: Checkout 🛎️
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
persist-credentials: false
|
2020-03-05 12:17:50 +08:00
|
|
|
|
|
|
|
- name: Setup .NET Core
|
|
|
|
uses: actions/setup-dotnet@v1
|
|
|
|
with:
|
2020-05-20 00:35:52 +08:00
|
|
|
dotnet-version: 3.1.300
|
2020-03-05 12:17:50 +08:00
|
|
|
|
2020-03-07 17:00:14 +08:00
|
|
|
- uses: actions/setup-node@v1
|
|
|
|
with:
|
|
|
|
node-version: '10.x'
|
|
|
|
|
2020-03-13 00:04:29 +08:00
|
|
|
- name: Publish Docs 🎉
|
2020-03-05 12:17:50 +08:00
|
|
|
run: |
|
2020-03-09 22:32:06 +08:00
|
|
|
npm install
|
2020-03-28 00:02:11 +08:00
|
|
|
cp -rf scripts/gh-pages/* scripts/gh-pages/.nojekyll scripts/gh-pages/.spa ./site/AntBlazor.Docs.Wasm/wwwroot
|
2020-03-13 23:25:22 +08:00
|
|
|
dotnet build
|
2020-03-20 22:50:20 +08:00
|
|
|
dotnet publish -c Release -o cargo
|
2020-03-05 12:17:50 +08:00
|
|
|
|
2020-03-13 00:04:29 +08:00
|
|
|
- name: Deploy 🚀
|
|
|
|
uses: JamesIves/github-pages-deploy-action@releases/v3
|
|
|
|
with:
|
2020-03-13 23:25:22 +08:00
|
|
|
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-04-28 13:39:41 +08:00
|
|
|
- name: Deploy to Github.io 🚀
|
|
|
|
uses: peaceiris/actions-gh-pages@v3
|
|
|
|
with:
|
|
|
|
personal_token: ${{ secrets.GH_PUSH_TOKEN }}
|
|
|
|
external_repository: ant-design-blazor/ant-design-blazor.github.io
|
|
|
|
publish_branch: master
|
|
|
|
publish_dir: ./cargo/wwwroot
|
|
|
|
|
2020-03-20 22:50:20 +08:00
|
|
|
- name: Package Nightly Nuget 📦
|
2020-03-05 12:17:50 +08:00
|
|
|
run: |
|
2020-03-25 18:39:08 +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
|
|
|
|
2020-03-13 00:04:29 +08:00
|
|
|
- name: Publish to Nuget ✔
|
2020-03-05 12:17:50 +08:00
|
|
|
run: |
|
2020-03-25 18:39:08 +08:00
|
|
|
dotnet nuget push pack-$GITHUB_RUN_ID/*.nupkg -s https://api.nuget.org/v3/index.json -k $NUGET_API_KEY --skip-duplicate
|
2020-03-25 18:26:26 +08:00
|
|
|
|
|
|
|
- name: Sync to Gitee 💕
|
|
|
|
uses: wearerequired/git-mirror-action@master
|
|
|
|
env:
|
|
|
|
SSH_PRIVATE_KEY: ${{ secrets.GITEE_PRIVATE_KEY }}
|
|
|
|
with:
|
2020-04-28 00:13:43 +08:00
|
|
|
source-repo: "git@github.com:ant-design-blazor/ant-design-blazor.git"
|
2020-03-25 18:26:26 +08:00
|
|
|
destination-repo: "git@gitee.com:ant-design-blazor/ant-design-blazor.git"
|
|
|
|
|
|
|
|
- name: Reload Gitee Pages 😆
|
|
|
|
uses: mizuka-wu/gitee-pages-action@v1.0.0
|
|
|
|
with:
|
|
|
|
repository: ant-design-blazor/ant-design-blazor
|
|
|
|
cookie: ${{ secrets.GITEE_COOKIE }}
|
2020-03-28 00:02:11 +08:00
|
|
|
branch: gh-pages
|