Skip to content

Commit

Permalink
feat: Supports to publish docs in workflow (#28)
Browse files Browse the repository at this point in the history
1. Update workflow
2. Fix the bug on links in docs
3. Make Chinese default

see issue: #27
  • Loading branch information
pinxiong authored Oct 25, 2021
1 parent 18ae7bf commit a32cafc
Show file tree
Hide file tree
Showing 194 changed files with 7,087 additions and 37,997 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: GitHub Pages

on:
push:
branches:
- master # Set a branch to deploy
pull_request:

jobs:
deploy:
name: "Deploy Capa.io Pages"
runs-on: ubuntu-20.04
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- name: "Checkout source code"
uses: actions/checkout@v2
with:
submodules: recursive # Fetch the Docsy theme
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod

- name: "Setup Hugo"
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.83.0'
extended: true

- name: "Setup Node"
uses: actions/setup-node@v2
with:
node-version: '14'

- name: "Cache dependencies"
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: "Install dependencies"
run: npm install

- name: "Build"
run: hugo --minify

- name: "Deploy"
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.ref == 'refs/heads/master' }} # Deploy in master branch only
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
12 changes: 6 additions & 6 deletions config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ theme = ["docsy"]
enableGitInfo = true

# Language settings
contentDir = "content/en"
defaultContentLanguage = "en"
contentDir = "content/zh"
defaultContentLanguage = "zh"
defaultContentLanguageInSubdir = false
# Useful when translating.
enableMissingTranslationPlaceholders = true
Expand Down Expand Up @@ -84,7 +84,7 @@ weight = 1
[languages.zh]
title = "Capa"
description = "Cloud Runtimes API"
languageName ="Chinese"
languageName ="简体中文"
contentDir = "content/zh"
time_format_default = "02.01.2006"
time_format_blog = "02.01.2006"
Expand Down Expand Up @@ -131,7 +131,7 @@ version = "0.0"
url_latest_version = "https://github.com/reactivegroup/capa.io"

# Repository configuration (URLs for in-page links to opening issues and suggesting changes)
github_repo = "https://github.com/google/docsy-example"
github_repo = "https://github.com/reactivegroup/capa"
# An optional link to a related project repo. For example, the sibling repository where your product code lives.
github_project_repo = "https://github.com/reactivegroup/capa"

Expand Down Expand Up @@ -161,13 +161,13 @@ breadcrumb_disable = false
# Set to true to disable the About link in the site footer
footer_about_disable = false
# Set to false if you don't want to display a logo (/assets/icons/logo.svg) in the top navbar
navbar_logo = true
navbar_logo = false
# Set to true if you don't want the top navbar to be translucent when over a `block/cover`, like on the homepage.
navbar_translucent_over_cover_disable = false
# Enable to show the side bar menu in its compact state.
sidebar_menu_compact = false
# Set to true to hide the sidebar search box (the top nav search box will still be displayed if search is enabled)
sidebar_search_disable = false
sidebar_search_disable = true

# Adds a H2 section titled "Feedback" to the bottom of each doc. The responses are sent to Google Analytics as events.
# This feature depends on [services.googleAnalytics] and will be disabled if "services.googleAnalytics.id" is not set.
Expand Down
42 changes: 21 additions & 21 deletions content/zh/_index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
<a class="btn btn-lg btn-secondary mr-3 mb-4" href="https://github.com/reactivegroup/capa">
Download <i class="fab fa-github ml-2 "></i>
</a>
<p class="lead mt-5">Porridge temperature assessment - in the cloud!</p>
{{< blocks/link-down color="info" >}}
<!-- <p class="lead mt-5">Porridge temperature assessment - in the cloud!</p> -->
<!-- {{< blocks/link-down color="info" >}} -->
</div>
{{< /blocks/cover >}}

Expand All @@ -26,65 +26,65 @@
{{% /blocks/lead %}}

<!-- block 2-1 -->
{{< blocks/section color="dark" >}}
{{% blocks/feature icon="fa-lightbulb" title="New chair metrics!" %}}
<!-- {{< blocks/section color="dark" >}} -->
<!-- {{% blocks/feature icon="fa-lightbulb" title="New chair metrics!" %}}
The Goldydocs UI now shows chair size metrics by default.
Please follow this space for updates!
{{% /blocks/feature %}}
{{% /blocks/feature %}} -->


<!-- block 2-2 -->
{{% blocks/feature icon="fab fa-github" title="Contributions welcome!" url="https://github.com/google/docsy-example" %}}
<!-- {{% blocks/feature icon="fab fa-github" title="Contributions welcome!" url="https://github.com/google/docsy-example" %}}
We do a [Pull Request](https://github.com/google/docsy-example/pulls) contributions workflow on **GitHub**. New users are always welcome!
{{% /blocks/feature %}}
{{% /blocks/feature %}} -->


<!-- block 2-3 -->
{{% blocks/feature icon="fab fa-twitter" title="Follow us on Twitter!" url="https://twitter.com/docsydocs" %}}
<!-- {{% blocks/feature icon="fab fa-twitter" title="Follow us on Twitter!" url="https://twitter.com/docsydocs" %}}
For announcement of latest features etc.
{{% /blocks/feature %}}
{{% /blocks/feature %}} -->


{{< /blocks/section >}}
<!-- {{< /blocks/section >}} -->


<!-- block 3 -->
{{< blocks/section >}}
<!-- {{< blocks/section >}}
<div class="col">
<h1 class="text-center">This is the second Section</h1>
</div>
{{< /blocks/section >}}
{{< /blocks/section >}} -->


<!-- block 3-1 -->
{{< blocks/section >}}
{{% blocks/feature icon="fab fa-app-store-ios" title="Download **from AppStore**" %}}
Get the Goldydocs app!
{{% blocks/feature icon="fab fa-github" title="Give us your feedback!" url="https://github.com/reactivegroup/capa" %}}
We hope to hear from you [here](https://github.com/reactivegroup/capa/issues)!
{{% /blocks/feature %}}


<!-- block 3-2 -->
{{% blocks/feature icon="fab fa-github" title="Contributions welcome!" url="https://github.com/google/docsy-example" %}}
We do a [Pull Request](https://github.com/google/docsy-example/pulls) contributions workflow on **GitHub**. New users are always welcome!
{{% blocks/feature icon="fab fa-github" title="Contributions welcome!" url="https://github.com/reactivegroup/capa" %}}
We do a [Pull Request](https://github.com/reactivegroup/capa/pulls) contributions workflow on **GitHub**. New users are always welcome!
{{% /blocks/feature %}}


<!-- block 3-3 -->
{{% blocks/feature icon="fab fa-twitter" title="Follow us on Twitter!" url="https://twitter.com/GoHugoIO" %}}
{{% blocks/feature icon="fab fa-github" title="Follow us on Github!" url="https://github.com/reactivegroup/capa" %}}
For announcement of latest features etc.
{{% /blocks/feature %}}


{{< /blocks/section >}}

{{< blocks/section >}}
<!-- {{< blocks/section >}} -->


<!-- block 4 -->
<div class="col-12">
<!-- <div class="col-12">
<h1 class="text-center">This is another Section</h1>
</div>
</div> -->

{{< /blocks/section >}}
<!-- {{< /blocks/section >}} -->
2 changes: 1 addition & 1 deletion content/zh/docs/Overview/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ This is the Capa SDK for Java, including the following features:

**参考资料:** https://github.com/dapr/dapr/issues/3261

### Why not DAPR
### Why not Dapr

设计思想和Dapr等项目是相同的,但是Dapr等项目走的非常靠前,其逻辑依赖于独立部署的dapr-sidecar来实现。

Expand Down
248 changes: 2 additions & 246 deletions docs/404.html

Large diffs are not rendered by default.

363 changes: 3 additions & 360 deletions docs/about/_print/index.html

Large diffs are not rendered by default.

363 changes: 3 additions & 360 deletions docs/about/index.html

Large diffs are not rendered by default.

18 changes: 1 addition & 17 deletions docs/about/index.xml
Original file line number Diff line number Diff line change
@@ -1,17 +1 @@
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Capa – About Goldydocs</title>
<link>https://reactivegroup.github.io/capa.io/about/</link>
<description>Recent content in About Goldydocs on Capa</description>
<generator>Hugo -- gohugo.io</generator>

<atom:link href="https://reactivegroup.github.io/capa.io/about/index.xml" rel="self" type="application/rss+xml" />







</channel>
</rss>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Capa – About Capa</title><link>https://reactivegroup.github.io/capa.io/about/</link><description>Recent content in About Capa on Capa</description><generator>Hugo -- gohugo.io</generator><atom:link href="https://reactivegroup.github.io/capa.io/about/index.xml" rel="self" type="application/rss+xml"/></channel></rss>
786 changes: 30 additions & 756 deletions docs/blog/2018/01/04/another-great-release/index.html

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
478 changes: 15 additions & 463 deletions docs/blog/2018/10/06/easy-documentation-with-docsy/index.html

Large diffs are not rendered by default.

786 changes: 30 additions & 756 deletions docs/blog/2018/10/06/the-second-blog-post/index.html

Large diffs are not rendered by default.

1,189 changes: 50 additions & 1,139 deletions docs/blog/_print/index.html

Large diffs are not rendered by default.

530 changes: 11 additions & 519 deletions docs/blog/index.html

Large diffs are not rendered by default.

Loading

0 comments on commit a32cafc

Please sign in to comment.