-
Notifications
You must be signed in to change notification settings - Fork 251
40 lines (35 loc) · 1.69 KB
/
cron-generate-pdf.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: Cron Generate Pdf
on:
schedule:
- cron: '0 12,18,1 * * *'
jobs:
build-and-deploy:
runs-on: ubuntu-latest
environment: Production
steps:
- name: Checkout
uses: actions/checkout@master
with:
persist-credentials: false
submodules: recursive
- name: Use Node.js
uses: actions/setup-node@v3
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
mkdir -p ./build-pdf/assets/files/
cp *.pdf ./build-pdf/assets/files/
ls ./build-pdf/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 }}
# use your own endpoint
endpoint: ${{ secrets.ALIYUN_OSS_ENDPOINT }}
folder: build-pdf
onlyUpload: true