Skip to content

Commit

Permalink
feat: Supports to publish docs in workflow
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: capa-cloud#27
  • Loading branch information
pinxiong committed Oct 24, 2021
1 parent 18ae7bf commit 6eeb4fc
Show file tree
Hide file tree
Showing 158 changed files with 1,126 additions and 1,054 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Workflow to build and deploy site to Github Pages using Hugo

# Name of Workflow
name: Capa pages

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [ master ]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "deploy"
deploy:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:

# Step 1 - Checks-out your repository under $GITHUB_WORKSPACE
- name: Checkout
uses: actions/checkout@v2
with:
submodules: true # Fetch Hugo themes
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod

# Step 2 - Sets up the latest version of Hugo
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: 'latest'

# Step 3 - Clean and don't fail
- name: Clean public directory
run: rm -rf docs

# Step 4 - Builds the site using the latest version of Hugo
# Also specifies the theme we want to use
- name: Build
run: hugo --theme=docsy

# Step 5 - Create name file
- name: Create cname file
run: echo 'freshswift.net' > docs/CNAME

# Step 6 - Push our generated site to our gh-pages branch
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs
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
6 changes: 3 additions & 3 deletions docs/404.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="generator" content="Hugo 0.88.1" /><META NAME="ROBOTS" CONTENT="INDEX, FOLLOW">
<meta name="generator" content="Hugo 0.83.1" /><META NAME="ROBOTS" CONTENT="INDEX, FOLLOW">


<link rel="shortcut icon" href="/capa.io/favicons/favicon.ico" >
Expand Down Expand Up @@ -35,8 +35,8 @@



<link rel="preload" href="/capa.io/scss/main.min.bd5285b713d3061549a6bfd34e5f4ec6775ede36672a3088260f0d420050647f.css" as="style">
<link href="/capa.io/scss/main.min.bd5285b713d3061549a6bfd34e5f4ec6775ede36672a3088260f0d420050647f.css" rel="stylesheet" integrity="">
<link rel="preload" href="/capa.io/scss/main.min.fc772cda7b2f36c33aace594196159bf170a54e1c5ef5d872213e30171818ee3.css" as="style">
<link href="/capa.io/scss/main.min.fc772cda7b2f36c33aace594196159bf170a54e1c5ef5d872213e30171818ee3.css" rel="stylesheet" integrity="">


<script
Expand Down
6 changes: 3 additions & 3 deletions docs/about/_print/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="generator" content="Hugo 0.88.1" /><link rel="canonical" type="text/html" href="https://reactivegroup.github.io/capa.io/about/">
<meta name="generator" content="Hugo 0.83.1" /><link rel="canonical" type="text/html" href="https://reactivegroup.github.io/capa.io/about/">
<link rel="alternate" type="application/rss&#43;xml" href="https://reactivegroup.github.io/capa.io/about/index.xml">
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">

Expand Down Expand Up @@ -55,8 +55,8 @@



<link rel="preload" href="/capa.io/scss/main.min.bd5285b713d3061549a6bfd34e5f4ec6775ede36672a3088260f0d420050647f.css" as="style">
<link href="/capa.io/scss/main.min.bd5285b713d3061549a6bfd34e5f4ec6775ede36672a3088260f0d420050647f.css" rel="stylesheet" integrity="">
<link rel="preload" href="/capa.io/scss/main.min.fc772cda7b2f36c33aace594196159bf170a54e1c5ef5d872213e30171818ee3.css" as="style">
<link href="/capa.io/scss/main.min.fc772cda7b2f36c33aace594196159bf170a54e1c5ef5d872213e30171818ee3.css" rel="stylesheet" integrity="">


<script
Expand Down
6 changes: 3 additions & 3 deletions docs/about/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="generator" content="Hugo 0.88.1" /><link rel="alternate" type="text/html" href="https://reactivegroup.github.io/capa.io/about/_print/">
<meta name="generator" content="Hugo 0.83.1" /><link rel="alternate" type="text/html" href="https://reactivegroup.github.io/capa.io/about/_print/">
<link rel="alternate" type="application/rss&#43;xml" href="https://reactivegroup.github.io/capa.io/about/index.xml">
<META NAME="ROBOTS" CONTENT="INDEX, FOLLOW">

Expand Down Expand Up @@ -55,8 +55,8 @@



<link rel="preload" href="/capa.io/scss/main.min.bd5285b713d3061549a6bfd34e5f4ec6775ede36672a3088260f0d420050647f.css" as="style">
<link href="/capa.io/scss/main.min.bd5285b713d3061549a6bfd34e5f4ec6775ede36672a3088260f0d420050647f.css" rel="stylesheet" integrity="">
<link rel="preload" href="/capa.io/scss/main.min.fc772cda7b2f36c33aace594196159bf170a54e1c5ef5d872213e30171818ee3.css" as="style">
<link href="/capa.io/scss/main.min.fc772cda7b2f36c33aace594196159bf170a54e1c5ef5d872213e30171818ee3.css" rel="stylesheet" integrity="">


<script
Expand Down
24 changes: 12 additions & 12 deletions docs/blog/2018/01/04/another-great-release/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="generator" content="Hugo 0.88.1" /><META NAME="ROBOTS" CONTENT="INDEX, FOLLOW">
<meta name="generator" content="Hugo 0.83.1" /><META NAME="ROBOTS" CONTENT="INDEX, FOLLOW">


<link rel="shortcut icon" href="/capa.io/favicons/favicon.ico" >
Expand All @@ -27,13 +27,13 @@
" />
<meta property="og:type" content="article" />
<meta property="og:url" content="https://reactivegroup.github.io/capa.io/blog/2018/01/04/another-great-release/" /><meta property="article:section" content="blog" />
<meta property="article:published_time" content="2018-01-04T00:00:00+00:00" />
<meta property="article:modified_time" content="2021-10-13T18:46:31+08:00" /><meta property="og:site_name" content="Capa" />
<meta property="article:published_time" content="2018-01-04T00:00:00&#43;00:00" />
<meta property="article:modified_time" content="2021-10-13T18:46:31&#43;08:00" /><meta property="og:site_name" content="Capa" />

<meta itemprop="name" content="Another Great Release">
<meta itemprop="description" content="A short lead description about this content page. Text here can also be **bold** or _italic_ and can even be split over multiple paragraphs.
"><meta itemprop="datePublished" content="2018-01-04T00:00:00+00:00" />
<meta itemprop="dateModified" content="2021-10-13T18:46:31+08:00" />
"><meta itemprop="datePublished" content="2018-01-04T00:00:00&#43;00:00" />
<meta itemprop="dateModified" content="2021-10-13T18:46:31&#43;08:00" />
<meta itemprop="wordCount" content="1234">
<meta itemprop="keywords" content="" /><meta name="twitter:card" content="summary"/>
<meta name="twitter:title" content="Another Great Release"/>
Expand All @@ -43,8 +43,8 @@



<link rel="preload" href="/capa.io/scss/main.min.bd5285b713d3061549a6bfd34e5f4ec6775ede36672a3088260f0d420050647f.css" as="style">
<link href="/capa.io/scss/main.min.bd5285b713d3061549a6bfd34e5f4ec6775ede36672a3088260f0d420050647f.css" rel="stylesheet" integrity="">
<link rel="preload" href="/capa.io/scss/main.min.fc772cda7b2f36c33aace594196159bf170a54e1c5ef5d872213e30171818ee3.css" as="style">
<link href="/capa.io/scss/main.min.fc772cda7b2f36c33aace594196159bf170a54e1c5ef5d872213e30171818ee3.css" rel="stylesheet" integrity="">


<script
Expand Down Expand Up @@ -386,7 +386,7 @@ <h2 id="header-2">Header 2</h2>
<p>This is a blockquote following a header. Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.</p>
</blockquote>
<h3 id="header-3">Header 3</h3>
<pre tabindex="0"><code>This is a code block following a header.
<pre><code>This is a code block following a header.
</code></pre><h4 id="header-4">Header 4</h4>
<ul>
<li>This is an unordered list following a header.</li>
Expand Down Expand Up @@ -551,10 +551,10 @@ <h6 id="header-6">Header 6</h6>
<p>Code snippets like <code>var foo = &quot;bar&quot;;</code> can be shown inline.</p>
<p>Also, <code>this should vertically align</code> <del><code>with this</code></del> <del>and this</del>.</p>
<p>Code can also be shown in a block element.</p>
<pre tabindex="0"><code>foo := &quot;bar&quot;;
<pre><code>foo := &quot;bar&quot;;
bar := &quot;foo&quot;;
</code></pre><p>Code can also use syntax highlighting.</p>
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-go" data-lang="go"><span style="color:#204a87;font-weight:bold">func</span> <span style="color:#000">main</span><span style="color:#000;font-weight:bold">()</span> <span style="color:#000;font-weight:bold">{</span>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-go" data-lang="go"><span style="color:#204a87;font-weight:bold">func</span> <span style="color:#000">main</span><span style="color:#000;font-weight:bold">()</span> <span style="color:#000;font-weight:bold">{</span>
<span style="color:#000">input</span> <span style="color:#ce5c00;font-weight:bold">:=</span> <span style="color:#4e9a06">`var foo = &#34;bar&#34;;`</span>

<span style="color:#000">lexer</span> <span style="color:#ce5c00;font-weight:bold">:=</span> <span style="color:#000">lexers</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">Get</span><span style="color:#000;font-weight:bold">(</span><span style="color:#4e9a06">&#34;javascript&#34;</span><span style="color:#000;font-weight:bold">)</span>
Expand All @@ -567,7 +567,7 @@ <h6 id="header-6">Header 6</h6>

<span style="color:#000">fmt</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">Println</span><span style="color:#000;font-weight:bold">(</span><span style="color:#000">buff</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">String</span><span style="color:#000;font-weight:bold">())</span>
<span style="color:#000;font-weight:bold">}</span>
</code></pre></div><pre tabindex="0"><code>Long, single-line code blocks should not wrap. They should horizontally scroll if they are too long. This line should be long enough to demonstrate this.
</code></pre></div><pre><code>Long, single-line code blocks should not wrap. They should horizontally scroll if they are too long. This line should be long enough to demonstrate this.
</code></pre><p>Inline code inside table cells should still be distinguishable.</p>
<table>
<thead>
Expand Down Expand Up @@ -655,7 +655,7 @@ <h3 id="more-is-better">More is better</h3>
<p>Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.</p>
<h3 id="used-ram">Used RAM</h3>
<p>Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.</p>
<pre tabindex="0"><code>This is the final element on the page and there should be no margin below this.
<pre><code>This is the final element on the page and there should be no margin below this.
</code></pre>


Expand Down
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.
Loading

0 comments on commit 6eeb4fc

Please sign in to comment.