This is an automated email from the ASF dual-hosted git repository.
morningman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris-website.git
The following commit(s) were added to refs/heads/master by this push:
new 0424a591082 [PDF] update generate pdf action (#199)
0424a591082 is described below
commit 0424a591082a776c5f23f9689a8922924eac6eb1
Author: Jeffrey <[email protected]>
AuthorDate: Tue Feb 21 20:15:29 2023 +0800
[PDF] update generate pdf action (#199)
Merge PDF upload and website upload actions, two action makes error, delete
some files
---
.github/workflows/cron-deploy-website.yml | 20 ++++++++++
.github/workflows/cron-generate-pdf.yml | 54 ---------------------------
.github/workflows/generate-pdf.yml | 58 -----------------------------
.github/workflows/manual-deploy-website.yml | 28 +++++++++-----
4 files changed, 39 insertions(+), 121 deletions(-)
diff --git a/.github/workflows/cron-deploy-website.yml
b/.github/workflows/cron-deploy-website.yml
index 9f2eef4a2ef..fdcf74300fc 100644
--- a/.github/workflows/cron-deploy-website.yml
+++ b/.github/workflows/cron-deploy-website.yml
@@ -15,6 +15,18 @@ jobs:
persist-credentials: false
submodules: recursive
+ - name: Add Chinese Fonts
+ run: |
+ sudo apt-get install ttf-mscorefonts-installer
+ sudo apt-get install fontconfig
+ fc-list :lang=zh
+ ls -lh /usr/share/fonts/
+ cp -rf ./static/fonts/* /usr/share/fonts/
+ mkfontscale
+ mkfontdir
+ fc-cache
+ fc-list :lang=zh
+
- name: Use Node.js
uses: actions/setup-node@v1
with:
@@ -47,6 +59,14 @@ jobs:
ls build
export DORIS_COMMIT=`git rev-parse HEAD`
+ - name: Generate PDF
+ run: |
+ npx vitpress-generate-pdf
--initialDocURLs="https://doris.apache.org/docs/dev/get-starting/"
--paginationSelector=".pagination-nav__link--next" --contentSelector="article"
--coverImage="https://cdn.selectdb.com/static/doris_logo_512_4903556647.png"
--coverTitle="Apache Doris Docs (English)" --outputPDFFilename="Apache Doris
Docs (English).pdf" --tocOnlyH1=true
+ npx vitpress-generate-pdf
--initialDocURLs="https://doris.apache.org/zh-CN/docs/dev/get-starting/"
--paginationSelector=".pagination-nav__link--next" --contentSelector="article"
--coverImage="https://cdn.selectdb.com/static/doris_logo_512_4903556647.png"
--coverTitle="Apache Doris Docs (中文)" --outputPDFFilename="Apache Doris Docs
(中文).pdf" --tocOnlyH1=true
+ mkdir -p ./build/assets/files/
+ cp *.pdf ./build/assets/files/
+ ls ./build/assets/files/
+
- name: Upload files to OSS
uses: ./.github/actions/aliyun-oss-website-action
with:
diff --git a/.github/workflows/cron-generate-pdf.yml
b/.github/workflows/cron-generate-pdf.yml
deleted file mode 100644
index 40d48610351..00000000000
--- a/.github/workflows/cron-generate-pdf.yml
+++ /dev/null
@@ -1,54 +0,0 @@
-name: Cron Generate PDF
-
-on:
- schedule:
- - cron: '0 1 * * *'
-env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-
-jobs:
- Generate-PDF:
- runs-on: ubuntu-latest
- environment: Production
- steps:
- - name: Checkout
- uses: actions/checkout@master
- with:
- persist-credentials: false
- submodules: recursive
-
- - name: Add Chinese Fonts
- run: |
- sudo apt-get install ttf-mscorefonts-installer
- sudo apt-get install fontconfig
- fc-list :lang=zh
- ls -lh /usr/share/fonts/
- cp -rf ./static/fonts/* /usr/share/fonts/
- mkfontscale
- mkfontdir
- fc-cache
- fc-list :lang=zh
-
- - name: Use Node.js
- uses: actions/setup-node@v1
- with:
- node-version: 16.14.0
-
- - name: Generate PDF
- run: |
- npx vitpress-generate-pdf
--initialDocURLs="https://doris.apache.org/docs/dev/get-starting/"
--paginationSelector=".pagination-nav__link--next" --contentSelector="article"
--coverImage="https://cdn.selectdb.com/static/doris_logo_512_4903556647.png"
--coverTitle="Apache Doris Docs (English)" --outputPDFFilename="Apache Doris
Docs (English).pdf" --tocOnlyH1=true
- npx vitpress-generate-pdf
--initialDocURLs="https://doris.apache.org/zh-CN/docs/dev/get-starting/"
--paginationSelector=".pagination-nav__link--next" --contentSelector="article"
--coverImage="https://cdn.selectdb.com/static/doris_logo_512_4903556647.png"
--coverTitle="Apache Doris Docs (中文)" --outputPDFFilename="Apache Doris Docs
(中文).pdf" --tocOnlyH1=true
- ls
- rm -rf ./build/**
- mkdir -p ./build/assets/files/
- cp *.pdf ./build/assets/files/
- ls ./build/assets/files/
-
- - name: Upload files to OSS
- uses: ./.github/actions/aliyun-oss-website-action
- with:
- accessKeyId: ${{ secrets.ALIYUN_ACCESS_KEY_ID }}
- accessKeySecret: ${{ secrets.ALIYUN_ACCESS_KEY_SECRET }}
- bucket: ${{ secrets.ALIYUN_OSS_BUCKET }}
- endpoint: ${{ secrets.ALIYUN_OSS_ENDPOINT }}
- folder: build
diff --git a/.github/workflows/generate-pdf.yml
b/.github/workflows/generate-pdf.yml
deleted file mode 100644
index 43158190f1c..00000000000
--- a/.github/workflows/generate-pdf.yml
+++ /dev/null
@@ -1,58 +0,0 @@
-name: Generate PDF
-
-on:
- workflow_dispatch:
- inputs:
- branch:
- description: 'Specify the branch name'
- required: true
- default: 'master'
-env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-
-jobs:
- Generate-PDF:
- runs-on: ubuntu-latest
- environment: Production
- steps:
- - name: Checkout
- uses: actions/checkout@master
- with:
- persist-credentials: false
- submodules: recursive
-
- - name: Add Chinese Fonts
- run: |
- sudo apt-get install ttf-mscorefonts-installer
- sudo apt-get install fontconfig
- fc-list :lang=zh
- ls -lh /usr/share/fonts/
- cp -rf ./static/fonts/* /usr/share/fonts/
- mkfontscale
- mkfontdir
- fc-cache
- fc-list :lang=zh
-
- - name: Use Node.js
- uses: actions/setup-node@v1
- with:
- node-version: 16.14.0
-
- - name: Generate PDF
- run: |
- npx vitpress-generate-pdf
--initialDocURLs="https://doris.apache.org/docs/dev/get-starting/"
--paginationSelector=".pagination-nav__link--next" --contentSelector="article"
--coverImage="https://cdn.selectdb.com/static/doris_logo_512_4903556647.png"
--coverTitle="Apache Doris Docs (English)" --outputPDFFilename="Apache Doris
Docs (English).pdf" --tocOnlyH1=true
- npx vitpress-generate-pdf
--initialDocURLs="https://doris.apache.org/zh-CN/docs/dev/get-starting/"
--paginationSelector=".pagination-nav__link--next" --contentSelector="article"
--coverImage="https://cdn.selectdb.com/static/doris_logo_512_4903556647.png"
--coverTitle="Apache Doris Docs (中文)" --outputPDFFilename="Apache Doris Docs
(中文).pdf" --tocOnlyH1=true
- ls
- rm -rf ./build/**
- mkdir -p ./build/assets/files/
- cp *.pdf ./build/assets/files/
- ls ./build/assets/files/
-
- - name: Upload files to OSS
- uses: ./.github/actions/aliyun-oss-website-action
- with:
- accessKeyId: ${{ secrets.ALIYUN_ACCESS_KEY_ID }}
- accessKeySecret: ${{ secrets.ALIYUN_ACCESS_KEY_SECRET }}
- bucket: ${{ secrets.ALIYUN_OSS_BUCKET }}
- endpoint: ${{ secrets.ALIYUN_OSS_ENDPOINT }}
- folder: build
diff --git a/.github/workflows/manual-deploy-website.yml
b/.github/workflows/manual-deploy-website.yml
index 21ec35a7ec0..941a5550fd2 100644
--- a/.github/workflows/manual-deploy-website.yml
+++ b/.github/workflows/manual-deploy-website.yml
@@ -18,6 +18,18 @@ jobs:
with:
persist-credentials: false
submodules: recursive
+
+ - name: Add Chinese Fonts
+ run: |
+ sudo apt-get install ttf-mscorefonts-installer
+ sudo apt-get install fontconfig
+ fc-list :lang=zh
+ ls -lh /usr/share/fonts/
+ cp -rf ./static/fonts/* /usr/share/fonts/
+ mkfontscale
+ mkfontdir
+ fc-cache
+ fc-list :lang=zh
- name: Use Node.js
uses: actions/setup-node@v1
@@ -50,15 +62,13 @@ jobs:
ls build
export DORIS_COMMIT=`git rev-parse HEAD`
- # - name: Generate PDF
- # run: |
- # npx vitpress-generate-pdf --buildDirPath="./build/"
--firstDocPath="/docs/summary/basic-summary/"
--paginationSelector=".pagination-nav__link--next" --contentSelector="article"
--coverImage="https://cdn.selectdb.com/images/doris-logo-512.png"
--coverTitle="Apache Doris 1.1 (English)" --outputPDFFilename="Apache Doris 1.1
(English).pdf"
- # npx vitpress-generate-pdf --buildDirPath="./build/"
--firstDocPath="/docs/dev/summary/basic-summary/"
--paginationSelector=".pagination-nav__link--next" --contentSelector="article"
--coverImage="https://cdn.selectdb.com/images/doris-logo-512.png"
--coverTitle="Apache Doris Dev (English)" --outputPDFFilename="Apache Doris Dev
(English).pdf"
- # npx vitpress-generate-pdf --buildDirPath="./build/"
--firstDocPath="/docs/0.15/summary/basic-summary/"
--paginationSelector=".pagination-nav__link--next" --contentSelector="article"
--coverImage="https://cdn.selectdb.com/images/doris-logo-512.png"
--coverTitle="Apache Doris 0.15 (English)" --outputPDFFilename="Apache Doris
0.15 (English).pdf"
- # npx vitpress-generate-pdf -buildDirPath="./build/"
--firstDocPath="/zh-CN/docs/summary/basic-summary/"
--paginationSelector=".pagination-nav__link--next" --contentSelector="article"
--coverImage="https://cdn.selectdb.com/images/doris-logo-512.png"
--coverTitle="Apache Doris 1.1 (中文)" --outputPDFFilename="Apache Doris 1.1
(中文).pdf"
- # npx vitpress-generate-pdf --buildDirPath="./build/"
--firstDocPath="/zh-CN/docs/dev/summary/basic-summary/"
--paginationSelector=".pagination-nav__link--next" --contentSelector="article"
--coverImage="https://cdn.selectdb.com/images/doris-logo-512.png"
--coverTitle="Apache Doris Dev (中文)" --outputPDFFilename="Apache Doris Dev
(中文).pdf"
- # npx vitpress-generate-pdf --buildDirPath="./build/"
--firstDocPath="/zh-CN/docs/0.15/summary/basic-summary/"
--paginationSelector=".pagination-nav__link--next" --contentSelector="article"
--coverImage="https://cdn.selectdb.com/images/doris-logo-512.png"
--coverTitle="Apache Doris 0.15 (中文)" --outputPDFFilename="Apache Doris 0.15
(中文).pdf"
- # cp *.pdf ./build/assets/files/
+ - name: Generate PDF
+ run: |
+ npx vitpress-generate-pdf
--initialDocURLs="https://doris.apache.org/docs/dev/get-starting/"
--paginationSelector=".pagination-nav__link--next" --contentSelector="article"
--coverImage="https://cdn.selectdb.com/static/doris_logo_512_4903556647.png"
--coverTitle="Apache Doris Docs (English)" --outputPDFFilename="Apache Doris
Docs (English).pdf" --tocOnlyH1=true
+ npx vitpress-generate-pdf
--initialDocURLs="https://doris.apache.org/zh-CN/docs/dev/get-starting/"
--paginationSelector=".pagination-nav__link--next" --contentSelector="article"
--coverImage="https://cdn.selectdb.com/static/doris_logo_512_4903556647.png"
--coverTitle="Apache Doris Docs (中文)" --outputPDFFilename="Apache Doris Docs
(中文).pdf" --tocOnlyH1=true
+ mkdir -p ./build/assets/files/
+ cp *.pdf ./build/assets/files/
+ ls ./build/assets/files/
- name: Upload files to OSS
uses: ./.github/actions/aliyun-oss-website-action
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]