You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shenyu.apache.org by fe...@apache.org on 2021/07/24 15:37:13 UTC

[incubator-shenyu-website] branch main updated: generate pdf (#144)

This is an automated email from the ASF dual-hosted git repository.

fengzhenbing pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-shenyu-website.git


The following commit(s) were added to refs/heads/main by this push:
     new 9209623  generate pdf (#144)
9209623 is described below

commit 92096233fa38fb85c0fd8e7eb7eacf2c7e619c5e
Author: dengliming <li...@gmail.com>
AuthorDate: Sat Jul 24 23:37:04 2021 +0800

    generate pdf (#144)
---
 .github/scripts/conf.py                      |  6 +++---
 .github/scripts/generate-pdf.sh              |  6 +++---
 .github/workflows/build-pdf.yml              | 28 ----------------------------
 .github/workflows/deploy.yml                 |  9 +++++++++
 content/en/projects/shenyu/download/index.md |  6 +++---
 content/zh/projects/shenyu/download/index.md | 14 +++++++-------
 6 files changed, 25 insertions(+), 44 deletions(-)

diff --git a/.github/scripts/conf.py b/.github/scripts/conf.py
index 4804fd6..2acb3b7 100644
--- a/.github/scripts/conf.py
+++ b/.github/scripts/conf.py
@@ -15,9 +15,9 @@
 # sys.path.insert(0, os.path.abspath('.'))
 # -- Project information -----------------------------------------------------
 
-project = 'Dromara project document'
-copyright = '2021, Dromara'
-author = 'Dromara'
+project = 'Apache ShenYu document'
+copyright = '2021, Apache ShenYu'
+author = 'Apache ShenYu'
 
 
 # -- General configuration ---------------------------------------------------
diff --git a/.github/scripts/generate-pdf.sh b/.github/scripts/generate-pdf.sh
index bf3edfc..9abdb1e 100644
--- a/.github/scripts/generate-pdf.sh
+++ b/.github/scripts/generate-pdf.sh
@@ -36,7 +36,7 @@ function generate_pdf {
         cp -r static/img/* $localDir/img
         cp .github/scripts/conf.py $localDir/
         cd $localDir
-        sed -i "s/Dromara project document/Dromara $1 document/g" conf.py
+        sed -i "s/Apache ShenYu document/Apache $1 document/g" conf.py
         if [[ "$lang" == "en" ]] ;then
             sed -i "s/language = 'zh_CN'/language = 'en_US'/" conf.py
             echo "printing English version PDF"
@@ -110,8 +110,8 @@ function generate_pdf {
         cd ..
         make latexpdf
         mkdir -p pdf
-        cp _build/latex/*.pdf ./public/pdf/dromara_$1_docs_$lang.pdf
-        echo "dromara_$1_docs_$lang.pdf"
+        cp _build/latex/*.pdf ./public/pdf/apache_$1_docs_$lang.pdf
+        echo "apache_$1_docs_$lang.pdf"
         make clean
         rm -rf {_build,source}
     done
diff --git a/.github/workflows/build-pdf.yml b/.github/workflows/build-pdf.yml
deleted file mode 100644
index f53f5ac..0000000
--- a/.github/workflows/build-pdf.yml
+++ /dev/null
@@ -1,28 +0,0 @@
-name: Build Docs PDF
-on: [workflow_dispatch]
-
-jobs:
-  build:
-    name: Publish PDF
-    runs-on: ubuntu-latest
-    steps:
-      - name: Checkout
-        uses: actions/checkout@v2
-      - name: Set up Python Env
-        uses: actions/setup-python@v2
-        with:
-          python-version: '3.7'
-      - name: Generate PDF
-        run: |
-          bash .github/scripts/generate-pdf.sh
-      - name: Deploy
-        uses: peaceiris/actions-gh-pages@v3
-        with:
-          github_token: ${{ secrets.GITHUB_TOKEN }}
-          publish_branch: asf-site
-          user_name: 'github-actions[bot]'
-          user_email: 'github-actions[bot]@users.noreply.github.com'
-          publish_dir: ./public/pdf
-          destination_dir: pdf
-          commit_message: 'Updated pdf'
-          keep_files: true
diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
index 363249f..0777843 100644
--- a/.github/workflows/deploy.yml
+++ b/.github/workflows/deploy.yml
@@ -29,6 +29,15 @@ jobs:
         env:
           HUGO_ENV: production
         run: hugo --minify
+      - name: Set up Python Env
+        uses: actions/setup-python@v2
+        if: github.event_name == 'push' && github.ref == 'refs/heads/main'
+        with:
+          python-version: '3.7'
+      - name: Generate PDF
+        if: github.event_name == 'push' && github.ref == 'refs/heads/main'
+        run: |
+          bash .github/scripts/generate-pdf.sh
       - name: Deploy
         uses: peaceiris/actions-gh-pages@v3
         if: github.event_name == 'push' && github.ref == 'refs/heads/main'
diff --git a/content/en/projects/shenyu/download/index.md b/content/en/projects/shenyu/download/index.md
index cbed4e5..b8ab3b1 100644
--- a/content/en/projects/shenyu/download/index.md
+++ b/content/en/projects/shenyu/download/index.md
@@ -8,13 +8,13 @@ description: Doc Download
 
 Apache ShenYu is released as source code tarballs with corresponding binary tarballs for convenience.
 
-`Apache Shenyu - Version: 2.3.0 ( Release Date: Apr 2, 2020 )`
+`Apache ShenYu - Version: 2.3.0 ( Release Date: Apr 2, 2020 )`
 
 - Source Codes: [zip](https://codeload.github.com/dromara/shenyu/zip/refs/tags/2.3.0) [tar](https://codeload.github.com/dromara/shenyu/tar.gz/refs/tags/2.3.0)
 - ShenYu-admin Binary Distribution: [tar](https://github-releases.githubusercontent.com/140543886/f562c480-9cb0-11eb-9f97-e6827c849866?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20210530%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20210530T170904Z&X-Amz-Expires=300&X-Amz-Signature=596b480f34f09707d759f249c4e7d5d2816d4fc9eefbc5026061a8d84a4ecf52&X-Amz-SignedHeaders=host&actor_id=13451528&key_id=0&repo_id=140543886&response-content-disposition=attachment%3B%20f [...]
 - ShenYu-bootstrap Binary Distribution: [tar](https://github-releases.githubusercontent.com/140543886/08759480-9cb1-11eb-9b09-974bc0c79c4c?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20210530%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20210530T170847Z&X-Amz-Expires=300&X-Amz-Signature=77f7718e6e46a8561024e25dc2669ea30005aa89c878a9f665edbb922762d6a6&X-Amz-SignedHeaders=host&actor_id=13451528&key_id=0&repo_id=140543886&response-content-disposition=attachment%3B [...]
 
-`Apache Shenyu Dashboard - Version: 2.3.0 ( Release Date: Apr 2, 2020 )`
+`Apache ShenYu Dashboard - Version: 2.3.0 ( Release Date: Apr 2, 2020 )`
 
 - Source Codes: [zip](https://codeload.github.com/dromara/shenyu-dashboard/zip/refs/tags/2.3.0) [tar](https://codeload.github.com/dromara/shenyu-dashboard/tar.gz/refs/tags/2.3.0)
 - ShenYu-dashboard Binary Distribution: [tar](https://github-releases.githubusercontent.com/141903742/4fbdbd00-96d4-11eb-92f4-fead1958fd5c?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20210530%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20210530T170738Z&X-Amz-Expires=300&X-Amz-Signature=60abef3f1ee0f4c7ad0311a2a5ce2acbd573cb4af5c522b79f8297ff29fcd631&X-Amz-SignedHeaders=host&actor_id=13451528&key_id=0&repo_id=141903742&response-content-disposition=attachment%3B [...]
@@ -24,5 +24,5 @@ Apache ShenYu is released as source code tarballs with corresponding binary tarb
 
 Apache ShenYu provides a packaged and downloaded PDF of the blog for users and developers to use.
 
-* [English](/pdf/dromara_soul_docs_en.pdf)
+* [English](/pdf/apache_shenyu_docs_en.pdf)
 
diff --git a/content/zh/projects/shenyu/download/index.md b/content/zh/projects/shenyu/download/index.md
index b828588..e050520 100644
--- a/content/zh/projects/shenyu/download/index.md
+++ b/content/zh/projects/shenyu/download/index.md
@@ -8,23 +8,23 @@ description: Doc Download
 
   Apache ShenYu 的发布版包括源码包及其对应的二进制包。
 
-  `Apache Shenyu - 版本: 2.3.0 ( 发布日期: Apr 2, 2020 )`
+  `Apache ShenYu - 版本: 2.3.0 ( 发布日期: Apr 2, 2020 )`
 
   - 源码 [zip](https://codeload.github.com/dromara/shenyu/zip/refs/tags/2.3.0) [tar](https://codeload.github.com/dromara/shenyu/tar.gz/refs/tags/2.3.0)
-  - ShenYu-admin 二进制包 [tar](https://github-releases.githubusercontent.com/140543886/f562c480-9cb0-11eb-9f97-e6827c849866?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20210530%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20210530T170904Z&X-Amz-Expires=300&X-Amz-Signature=596b480f34f09707d759f249c4e7d5d2816d4fc9eefbc5026061a8d84a4ecf52&X-Amz-SignedHeaders=host&actor_id=13451528&key_id=0&repo_id=140543886&response-content-disposition=attachment%3B%20filename%3Dsoul [...]
-  - ShenYu-bootstrap 二进制包 [tar](https://github-releases.githubusercontent.com/140543886/08759480-9cb1-11eb-9b09-974bc0c79c4c?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20210530%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20210530T170847Z&X-Amz-Expires=300&X-Amz-Signature=77f7718e6e46a8561024e25dc2669ea30005aa89c878a9f665edbb922762d6a6&X-Amz-SignedHeaders=host&actor_id=13451528&key_id=0&repo_id=140543886&response-content-disposition=attachment%3B%20filename%3D [...]
+  - shenyu-admin 二进制包 [tar](https://github-releases.githubusercontent.com/140543886/f562c480-9cb0-11eb-9f97-e6827c849866?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20210530%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20210530T170904Z&X-Amz-Expires=300&X-Amz-Signature=596b480f34f09707d759f249c4e7d5d2816d4fc9eefbc5026061a8d84a4ecf52&X-Amz-SignedHeaders=host&actor_id=13451528&key_id=0&repo_id=140543886&response-content-disposition=attachment%3B%20filename%3Dsoul [...]
+  - shenyu-bootstrap 二进制包 [tar](https://github-releases.githubusercontent.com/140543886/08759480-9cb1-11eb-9b09-974bc0c79c4c?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20210530%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20210530T170847Z&X-Amz-Expires=300&X-Amz-Signature=77f7718e6e46a8561024e25dc2669ea30005aa89c878a9f665edbb922762d6a6&X-Amz-SignedHeaders=host&actor_id=13451528&key_id=0&repo_id=140543886&response-content-disposition=attachment%3B%20filename%3D [...]
 
-  `Apache Shenyu Dashboard - 版本: 2.3.0 ( 发布日期: Apr 2, 2020 )`
+  `Apache ShenYu Dashboard - 版本: 2.3.0 ( 发布日期: Apr 2, 2020 )`
 
   - 源码 [zip](https://codeload.github.com/dromara/shenyu-dashboard/zip/refs/tags/2.3.0) [tar](https://codeload.github.com/dromara/shenyu-dashboard/tar.gz/refs/tags/2.3.0)
-  - ShenYu-dashboard 二进制包 [tar](https://github-releases.githubusercontent.com/141903742/4fbdbd00-96d4-11eb-92f4-fead1958fd5c?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20210530%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20210530T170738Z&X-Amz-Expires=300&X-Amz-Signature=60abef3f1ee0f4c7ad0311a2a5ce2acbd573cb4af5c522b79f8297ff29fcd631&X-Amz-SignedHeaders=host&actor_id=13451528&key_id=0&repo_id=141903742&response-content-disposition=attachment%3B%20filename%3D [...]
+  - shenyu-dashboard 二进制包 [tar](https://github-releases.githubusercontent.com/141903742/4fbdbd00-96d4-11eb-92f4-fead1958fd5c?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20210530%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20210530T170738Z&X-Amz-Expires=300&X-Amz-Signature=60abef3f1ee0f4c7ad0311a2a5ce2acbd573cb4af5c522b79f8297ff29fcd631&X-Amz-SignedHeaders=host&actor_id=13451528&key_id=0&repo_id=141903742&response-content-disposition=attachment%3B%20filename%3D [...]
   
 
 ## PDF
 
   Apache ShenYu 提供了博客打包下载的 PDF,供使用者、开发者查阅。
 
-  * [中文](/pdf/dromara_soul_docs_zh.pdf)
+  * [中文](/pdf/apache_shenyu_docs_zh.pdf)
 
-  * [English](/pdf/dromara_soul_docs_en.pdf)
+  * [English](/pdf/apache_shenyu_docs_en.pdf)