Skip to content

Commit

Permalink
chore: update issue/pr template and update docs cache version
Browse files Browse the repository at this point in the history
  • Loading branch information
ElderJames committed Jan 27, 2021
1 parent 93064c0 commit cf2d4ed
Show file tree
Hide file tree
Showing 7 changed files with 57 additions and 27 deletions.
4 changes: 2 additions & 2 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

Want to contribute to Ant Design? There are a few things you need to know.

We wrote a **[contribution guide](https://ant.design/en-US/docs/contributing)** to help you get started.
We wrote a **[contribution guide](https://antblazor.com/en-US/docs/contributing)** to help you get started.

---

# 参与共建

想要给 Ant Design Blazor 贡献自己的一份力量?

我们写了一份 **[贡献指南](https://ant.design/zh-CN/docs/contributing)** 来帮助你开始。
我们写了一份 **[贡献指南](https://ant-design-blazor.gitee.io/zh-CN/docs/contributing)** 来帮助你开始。
9 changes: 9 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,17 @@ name: 🐞 Bug report
about: Create a report about something that is not working
---

<!--
请尽量使用英语,因为我们有来自全球的贡献者,使用英语会让您的问题和需求得到更迅速的响应和解决。
推荐使用:https://cn.bing.com/translator
Please use English as much as possible, as we have contributors from all over the world,
using English will allow your questions and needs to be responded to and resolved more quickly.
-->

### Describe the bug

A clear and concise description of what the bug is.

### Steps to reproduce (please include code)
Expand Down
9 changes: 9 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@ name: 💡 Feature request
about: Suggest an idea for this project
---

<!--
请尽量使用英语,因为我们有来自全球的贡献者,使用英语会让您的问题和需求得到更迅速的响应和解决。
推荐使用:https://cn.bing.com/translator
Please use English as much as possible, as we have contributors from all over the world,
using English will allow your questions and needs to be responded to and resolved more quickly.
-->

### Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is.
Example: I am trying to do [...] but [...]
Expand Down
3 changes: 2 additions & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ First of all, thank you for your contribution! 😄
New feature please send pull request to feature branch, and rest to master branch.
Pull request will be merged after one of collaborators approve.
Please makes sure that these form are filled before submitting your pull request, thank you!
-->
[[中文版模板 / Chinese template](https://github.com/ant-design-blazor/ant-design-blazor/blob/master/.github/PULL_REQUEST_TEMPLATE/pr_cn.md)]
-->

### 🤔 This is a ...

- [ ] New feature
Expand Down
6 changes: 6 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/pr_cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
在一个维护者审核通过后合并。
请确保填写以下 pull request 的信息,谢谢!~
请尽量使用英语,因为我们有来自全球的贡献者,使用英语会让您的问题和需求得到更迅速的响应和解决。
推荐使用:https://cn.bing.com/translator
Please use English as much as possible, as we have contributors from all over the world,
using English will allow your questions and needs to be responded to and resolved more quickly.
[[English Template / 英文模板](?expand=1)]
-->

Expand Down
33 changes: 19 additions & 14 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,27 @@ jobs:
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

- name: Package Nightly Nuget 📦
id: pack
run: |
FULL_VERSION=$Version-nightly-`date "+%y%m%d%H%M"`
echo "Version: ${FULL_VERSION}"
echo "::set-output name=package_version::${FULL_VERSION}"
dotnet pack components/AntDesign.csproj /p:PackageVersion=${FULL_VERSION} -c Release -o publish
- name: Publish to Nuget ✔
run: |
dotnet nuget push publish/*.nupkg -s https://api.nuget.org/v3/index.json -k $NUGET_API_KEY --skip-duplicate
- name: Publish Docs 🎉
run: |
npm install
echo "/* updated `date "+%Y-%m-%d %H:%M:%S"` */" >> ./site/AntDesign.Docs.Wasm/wwwroot/service-worker.published.js
cp -rf scripts/gh-pages/* scripts/gh-pages/.nojekyll scripts/gh-pages/.spa ./site/AntDesign.Docs.Wasm/wwwroot
dotnet build -c Release
dotnet publish ./site/AntDesign.Docs.Wasm -c Release -f net5 -o cargo
sed -i s/{version}/$PACKAGE_VERSION/g ./cargo/wwwroot/index.html
env:
PACKAGE_VERSION: ${{ steps.pack.outputs.package_version }}

- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@releases/v3
Expand All @@ -66,16 +80,7 @@ jobs:
publish_branch: master
publish_dir: ./cargo/wwwroot
cname: antblazor.com

- name: Package Nightly Nuget 📦
run: |
FULL_VERSION=$Version-nightly-`date "+%y%m%d%H%M"`
echo "Version: ${FULL_VERSION}"
dotnet pack components/AntDesign.csproj /p:PackageVersion=${FULL_VERSION} -c Release -o publish --no-build --no-restore
- name: Publish to Nuget ✔
run: |
dotnet nuget push publish/*.nupkg -s https://api.nuget.org/v3/index.json -k $NUGET_API_KEY --skip-duplicate
tag_name: ${{ steps.pack.outputs.package_version }}

- name: Sync to Gitee 💕
uses: wearerequired/git-mirror-action@master
Expand All @@ -85,6 +90,6 @@ jobs:
source-repo: "git@github.com:ant-design-blazor/ant-design-blazor.git"
destination-repo: "git@gitee.com:ant-design-blazor/ant-design-blazor.git"

- name: 🧹Purge jsDeliver CDN
run: |
bash ./scripts/purge-jsdelivr.sh ./cargo/wwwroot ant-design-blazor/ant-design-blazor.github.io
# - name: 🧹Purge jsDeliver CDN
# run: |
# bash ./scripts/purge-jsdelivr.sh ./cargo/wwwroot ant-design-blazor/ant-design-blazor.github.io
20 changes: 10 additions & 10 deletions scripts/gh-pages/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<base href="/" />
<link rel="icon" href="logo.png" type="image/x-icon">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/docsearch.js@2.6.3/dist/cdn/docsearch.min.css" />
<link href="https://cdn.jsdelivr.net/gh/ant-design-blazor/ant-design-blazor.github.io/_content/AntDesign.Docs/css/docs.css" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/gh/ant-design-blazor/ant-design-blazor.github.io@{version}/_content/AntDesign.Docs/css/docs.css" rel="stylesheet">
<link href="manifest.json" rel="manifest" />
</head>

Expand Down Expand Up @@ -174,7 +174,7 @@
}
</style>
<div style="display: flex; justify-content: center; align-items: center; flex-direction: column; min-height: 420px; height: 100%;">
<img src="https://cdn.jsdelivr.net/gh/ant-design-blazor/ant-design-blazor.github.io/logo.png" alt="logo" width="256">
<img src="https://cdn.jsdelivr.net/gh/ant-design-blazor/ant-design-blazor.github.io@{version}/logo.png" alt="logo" width="256">
<div class="page-loading-warp">
<div class="ant-spin ant-spin-lg ant-spin-spinning">
<span class="ant-spin-dot ant-spin-dot-spin">
Expand All @@ -186,7 +186,7 @@
</div>
</div>
<div style="display: flex; justify-content: center; align-items: center;">
<img src="https://cdn.jsdelivr.net/gh/ant-design-blazor/ant-design-blazor.github.io/logo.png" width="32" style="margin-right: 8px;"> Ant Design of Blazor
<img src="https://cdn.jsdelivr.net/gh/ant-design-blazor/ant-design-blazor.github.io@{version}/logo.png" width="32" style="margin-right: 8px;"> Ant Design of Blazor
</div>
</div>
</div>
Expand Down Expand Up @@ -223,19 +223,19 @@
</script>
<!-- End Single Page Apps for GitHub Pages -->

<script src="https://cdn.jsdelivr.net/gh/ant-design-blazor/ant-design-blazor.github.io/_content/AntDesign.Charts/g2plot.js"></script>
<script src="https://cdn.jsdelivr.net/gh/ant-design-blazor/ant-design-blazor.github.io/_content/AntDesign.Charts/ant-design-charts-blazor.js"></script>
<script src="https://cdn.jsdelivr.net/gh/ant-design-blazor/ant-design-blazor.github.io/_content/AntDesign/js/ant-design-blazor.js"></script>
<script src="https://cdn.jsdelivr.net/gh/ant-design-blazor/ant-design-blazor.github.io/_content/AntDesign.Docs/js/prism.js"></script>
<script src="https://cdn.jsdelivr.net/gh/ant-design-blazor/ant-design-blazor.github.io@{version}/_content/AntDesign.Charts/g2plot.js"></script>
<script src="https://cdn.jsdelivr.net/gh/ant-design-blazor/ant-design-blazor.github.io@{version}/_content/AntDesign.Charts/ant-design-charts-blazor.js"></script>
<script src="https://cdn.jsdelivr.net/gh/ant-design-blazor/ant-design-blazor.github.io@{version}/_content/AntDesign/js/ant-design-blazor.js"></script>
<script src="https://cdn.jsdelivr.net/gh/ant-design-blazor/ant-design-blazor.github.io@{version}/_content/AntDesign.Docs/js/prism.js"></script>
<!-- use compression via https://docs.microsoft.com/en-us/aspnet/core/blazor/host-and-deploy/webassembly?view=aspnetcore-5.0#compression -->
<script src="https://cdn.jsdelivr.net/gh/google/brotli/js/decode.js"></script>
<script src="https://cdn.jsdelivr.net/gh/ant-design-blazor/ant-design-blazor.github.io/_framework/blazor.webassembly.js" autostart="false"></script>
<script src="https://cdn.jsdelivr.net/gh/ant-design-blazor/ant-design-blazor.github.io@{version}/_framework/blazor.webassembly.js" autostart="false"></script>
<script>
Blazor.start({
loadBootResource: function (type, name, defaultUri, integrity) {
if (type !== 'dotnetjs' && location.hostname !== 'localhost') {
return (async function () {
defaultUri = 'https://cdn.jsdelivr.net/gh/ant-design-blazor/ant-design-blazor.github.io/' + defaultUri;
defaultUri = 'https://cdn.jsdelivr.net/gh/ant-design-blazor/ant-design-blazor.github.io@{version}/' + defaultUri;
const response = await fetch(defaultUri + '.br', { cache: 'no-cache' });
if (!response.ok) {
throw new Error(response.statusText);
Expand Down Expand Up @@ -263,7 +263,7 @@
}
</script>
<script src="https://cdn.jsdelivr.net/npm/docsearch.js@2.6.3/dist/cdn/docsearch.min.js" integrity="sha256-qybEsgf0PGiQS22AmoozPs09oRnSC7Gu7eBu4fbS2Ac=" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/gh/ant-design-blazor/ant-design-blazor.github.io/_content/AntDesign.Docs/js/docsearch.js"></script>
<script src="https://cdn.jsdelivr.net/gh/ant-design-blazor/ant-design-blazor.github.io@{version}/_content/AntDesign.Docs/js/docsearch.js"></script>
<script>navigator.serviceWorker.register('service-worker.js');</script>
</body>
</html>

0 comments on commit cf2d4ed

Please sign in to comment.