-
Notifications
You must be signed in to change notification settings - Fork 114
49 lines (46 loc) · 1.67 KB
/
deploy.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
41
42
43
44
45
46
47
48
49
name: seata website deploy on github
on:
push:
branches:
- docusaurus
#This schedule only takes effect in the default branch
schedule:
- cron: '0 */12 * * *'
jobs:
Build-Deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js 19.5.x
uses: actions/setup-node@v1
with:
node-version: 19.5.x
- name: Build
run: |
npm install && npm run build && mkdir -p deploy-dist && cp -R build/* deploy-dist/ && mv build .htaccess .asf.yaml *.txt *.html deploy-dist/
- name:
generate sitemap.xml and site.txt
# The new generated sitemap for the index form,
# in order to ensure consistency with the old version,
# here directly to the details of the sitemap (sitemap.0.xml) renamed as a whole sitemap,
# if the number of articles increases in the future,
# the details of the sitemap will be split into multiple files (sitemap.0.xml,sitemap.1.xml),
# you may need to modify.
env:
ALGOLIA_APIKEY: ${{secrets.ALGOLIA_APIKEY}}
run: |
mkdir sitemaps && node sitemap.js
cp sitemaps/sitemap.0.xml deploy-dist/sitemap.xml
cp sitemaps/site.txt deploy-dist/site.txt
- name: baidu link submit
env:
BAIDU_LINK_SUBMIT_TOKEN: ${{secrets.BAIDU_LINK_SUBMIT_TOKEN}}
run: node baiduLinkSubmit.js
- name: Deploy
uses: peaceiris/actions-gh-pages@v2.8.0
env:
ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}
PUBLISH_BRANCH: asf-site
PUBLISH_DIR: ./deploy-dist
with:
keepFiles: true