Skip to content

Commit 464f4c1

Browse files
committed
feat: deploy book to cdn
1 parent aa71d44 commit 464f4c1

File tree

6 files changed

+24
-213
lines changed

6 files changed

+24
-213
lines changed

.drone.yml

Lines changed: 0 additions & 62 deletions
This file was deleted.

.github/workflows/book.yml

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,6 @@ jobs:
4040
- name: Build
4141
run: |
4242
mdbook build
43-
cp Dockerfile book/Dockerfile
44-
cp nginx.conf book/nginx.conf
45-
cp book.yaml book/book.yaml
4643
working-directory: book
4744
- uses: actions/upload-artifact@v3
4845
with:
@@ -61,4 +58,26 @@ jobs:
6158
- uses: peaceiris/actions-gh-pages@v3
6259
with:
6360
github_token: ${{ secrets.GITHUB_TOKEN }}
64-
publish_dir: .
61+
publish_dir: .
62+
- uses: Pivot-Studio/action-qiniu-upload@master
63+
with:
64+
# Your qiniu access key, required.
65+
access_key: ${{ secrets.QINIU_ACCESS_KEY }}
66+
67+
# Your qiniu secret key, required.
68+
secret_key: ${{ secrets.QINIU_SECRET_KEY }}
69+
70+
# Bucket name, required.
71+
bucket: ${{ secrets.QINIU_BUCKET }}
72+
73+
# The local directory (or file) you want to upload to bucket.
74+
# Default: './'
75+
source_dir: './'
76+
77+
# The directory inside of the bucket you want to upload to, namely key prefix prepended to dest file key.
78+
# Default: '/'
79+
dest_dir: '/docs'
80+
81+
# Whether to ignore source maps.
82+
# Default: true
83+
ignore_source_map: true

book/Dockerfile

Lines changed: 0 additions & 3 deletions
This file was deleted.

book/book.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ git-repository-icon = "fa-github"
1414
edit-url-template = "https://github.com/Pivot-Studio/pivot-lang/edit/master/book/{path}"
1515
additional-css = ["././mdbook-admonish.css"]
1616
additional-js = ["mermaid.min.js", "mermaid-init.js"]
17+
site-url = "/docs/"
1718

1819
[preprocessor]
1920

book/book.yaml

Lines changed: 0 additions & 105 deletions
This file was deleted.

book/nginx.conf

Lines changed: 0 additions & 39 deletions
This file was deleted.

0 commit comments

Comments
 (0)