Skip to content

Commit adf3296

Browse files
authored
Ci/deploy homepage (#84)
* Update RustVault logo * deploy rustyvault website
1 parent f50b4ec commit adf3296

File tree

5 files changed

+61
-4
lines changed

5 files changed

+61
-4
lines changed
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Deploy to AliCloud OSS
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- '.github/workflows/website.yml'
9+
- ".github/workflows/deploy-website.yml"
10+
- 'docs/**'
11+
12+
jobs:
13+
build:
14+
name: Build Docusaurus
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
with:
19+
fetch-depth: 0
20+
- uses: actions/setup-node@v4
21+
with:
22+
node-version: 18
23+
cache: yarn
24+
25+
- name: Install dependencies
26+
run: yarn install --frozen-lockfile
27+
- name: Build website
28+
run: yarn build
29+
30+
- name: Upload build artifacts
31+
uses: actions/upload-artifact@v4
32+
with:
33+
name: build-artifacts
34+
path: build
35+
36+
deploy:
37+
name: Deploy to AliCloud OSS
38+
needs: build
39+
runs-on: ubuntu-latest
40+
steps:
41+
- name: Download build artifacts
42+
uses: actions/download-artifact@v4
43+
with:
44+
name: build-artifacts
45+
path: build
46+
47+
- uses: YangHanlin/oss-deployment-action@v1
48+
with:
49+
oss-endpoint: oss-cn-beijing.aliyuncs.com
50+
oss-accesskey-id: ${{ secrets.ALIYUN_OSS_ACCESSKEY_ID }}
51+
oss-accesskey-secret: ${{ secrets.ALIYUN_OSS_ACCESSKEY_SECRET }}
52+
oss-path: oss://rustyvault-doc/
53+
local-path: ./build
54+
delete-first: true

.github/workflows/rust.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@ on:
44
push:
55
branches: [ "main" ]
66
paths-ignore:
7-
- "docs/**/*"
7+
- "docs/**"
88
- ".github/workflows/website.yml"
9+
- ".github/workflows/deploy-website.yml"
910
pull_request:
1011
branches: [ "main" ]
1112
paths-ignore:
12-
- "docs/**/*"
13+
- "docs/**"
1314
- ".github/workflows/website.yml"
15+
- ".github/workflows/deploy-website.yml"
1416

1517
env:
1618
CARGO_TERM_COLOR: always

.github/workflows/website.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ on:
44
pull_request:
55
paths:
66
- ".github/workflows/website.yml"
7-
- "docs/**/*"
7+
- ".github/workflows/deploy-website.yml"
8+
- "docs/**"
89
push:
910
branches: [main]
1011

docs/docusaurus.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ module.exports = {
124124
],
125125
},
126126
],
127-
copyright: `Copyright © 2021-${new Date().getFullYear()} OpenAtom Tongsuo Built with Docusaurus. `,
127+
copyright: `Copyright © 2021-${new Date().getFullYear()} OpenAtom Tongsuo Built with Docusaurus. <br/><a class="footer__link-item" href="https://beian.miit.gov.cn/">网站备案:京ICP备2020036654号-15</a> <img src="img/police.png" width="15" /> 京公网安备11030102011687号`,
128128
},
129129
prism: {
130130
additionalLanguages: [

docs/static/img/police.png

2.65 KB
Loading

0 commit comments

Comments
 (0)