-
Notifications
You must be signed in to change notification settings - Fork 115
47 lines (45 loc) · 1.78 KB
/
deploy-oss.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
name: seata website deploy on oss
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 deploy-dist && cp -R build/* deploy-dist/
mv .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: Install serverless-devs
run: npm i @serverless-devs/[email protected] -g --registry=https://registry.npmmirror.com
- name: Config serverless-devs
run: s config add --AccountID ${{secrets.ACCOUNT_ID}} --AccessKeyID ${{secrets.ACCESS_KEYID}} --AccessKeySecret ${{secrets.ACCESS_KEYSECRET}} -a seata -f
- name: Deploy on OSS
run: s deploy --use-local -y