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

65 lines
2.1 KiB
YAML

name: Publish Docs
env:
Version: 0.0.1
NUGET_API_KEY: ${{secrets.NUGET_API_KEY}}
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.102
- uses: actions/setup-node@v1
with:
node-version: '10.x'
- name: Publish Docs 🎉
run: |
npm install
cp -rf scripts/gh-pages/* scripts/gh-pages/.nojekyll scripts/gh-pages/.spa ./site/AntBlazor.Docs.ClientApp/wwwroot
dotnet build
dotnet publish -c Release -o cargo
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
ACCESS_TOKEN: ${{ secrets.GH_PUSH_TOKEN }}
BRANCH: gh-pages
FOLDER: cargo/wwwroot
- name: Package Nightly Nuget 📦
run: |
dotnet pack components/AntBlazor.csproj /p:PackageVersion=$Version-nightly-$GITHUB_RUN_ID -c Release -o pack-$GITHUB_RUN_ID --no-build --no-restore
- name: Publish to Nuget ✔
run: |
dotnet nuget push pack-$GITHUB_RUN_ID/*.nupkg -s https://api.nuget.org/v3/index.json -k $NUGET_API_KEY --skip-duplicate
- name: Sync to Gitee 💕
uses: wearerequired/git-mirror-action@master
env:
SSH_PRIVATE_KEY: ${{ secrets.GITEE_PRIVATE_KEY }}
with:
source-repo: "git@github.com:ElderJames/ant-design-blazor.git"
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 }}
branch: gh-pages