Skip to content

Commit a40441d

Browse files
committed
chore: update build.yml
1 parent 24df9d3 commit a40441d

File tree

2 files changed

+45
-43
lines changed

2 files changed

+45
-43
lines changed

.github/workflows/build.yml

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -15,28 +15,28 @@ jobs:
1515
runs-on: ubuntu-latest
1616

1717
steps:
18-
- uses: actions/checkout@v2
19-
- name: Use Node.js ${{ matrix.node-version }}
20-
uses: actions/setup-node@v1
21-
with:
22-
node-version: ${{ matrix.node-version }}
23-
- run: npm i yarn -g
24-
- run: yarn
25-
- run: yarn run build
26-
- run: mv dist canvas-editor
27-
- name: Copy folder content recursively to remote
28-
uses: garygrossgarten/github-action-scp@release
29-
with:
30-
local: canvas-editor
31-
remote: ${{ secrets.PATH }}
32-
host: ${{ secrets.HOST }}
33-
username: ${{ secrets.USERNAME }}
34-
password: ${{ secrets.PASSWORD }}
35-
rmRemote: true
36-
- name: Executing remote ssh commands
37-
uses: appleboy/[email protected]
38-
with:
39-
host: ${{ secrets.HOST }}
40-
username: ${{ secrets.USERNAME }}
41-
password: ${{ secrets.PASSWORD }}
42-
script: sed -i 's/<\/body>/${{ secrets.SCRIPT }}<\/body>/g' ${{ secrets.PATH }}/index.html
18+
- uses: actions/checkout@v2
19+
- name: Use Node.js ${{ matrix.node-version }}
20+
uses: actions/setup-node@v1
21+
with:
22+
node-version: ${{ matrix.node-version }}
23+
- run: npm i yarn -g
24+
- run: yarn
25+
- run: yarn run build
26+
- run: mv dist canvas-editor
27+
- name: Copy folder content recursively to remote
28+
uses: appleboy/scp-action@v0.1.7
29+
with:
30+
source: canvas-editor
31+
target: ${{ secrets.PATH }}
32+
host: ${{ secrets.HOST }}
33+
username: ${{ secrets.USERNAME }}
34+
password: ${{ secrets.PASSWORD }}
35+
overwrite: true
36+
- name: Executing remote ssh commands
37+
uses: appleboy/[email protected]
38+
with:
39+
host: ${{ secrets.HOST }}
40+
username: ${{ secrets.USERNAME }}
41+
password: ${{ secrets.PASSWORD }}
42+
script: sed -i 's/<\/body>/${{ secrets.SCRIPT }}<\/body>/g' ${{ secrets.PATH }}/canvas-editor/index.html

.github/workflows/docs.yml

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,30 @@ on:
44
push:
55
branches: [main]
66
paths:
7+
- '.github/workflows/docs.yml'
78
- 'docs/**'
89

910
jobs:
1011
build:
1112
runs-on: ubuntu-latest
1213

1314
steps:
14-
- uses: actions/checkout@v2
15-
- name: Use Node.js ${{ matrix.node-version }}
16-
uses: actions/setup-node@v1
17-
with:
18-
node-version: ${{ matrix.node-version }}
19-
- run: npm i yarn -g
20-
- run: yarn
21-
- run: yarn run docs:build
22-
- run: mv ./docs/.vitepress/dist ./docs/.vitepress/canvas-editor-docs
23-
- name: Copy folder content recursively to remote
24-
uses: garygrossgarten/github-action-scp@release
25-
with:
26-
local: ./docs/.vitepress/canvas-editor-docs
27-
remote: ${{ secrets.DOCS_PATH }}
28-
host: ${{ secrets.HOST }}
29-
username: ${{ secrets.USERNAME }}
30-
password: ${{ secrets.PASSWORD }}
31-
rmRemote: true
15+
- uses: actions/checkout@v2
16+
- name: Use Node.js ${{ matrix.node-version }}
17+
uses: actions/setup-node@v1
18+
with:
19+
node-version: ${{ matrix.node-version }}
20+
- run: npm i yarn -g
21+
- run: yarn
22+
- run: yarn run docs:build
23+
- run: mv ./docs/.vitepress/dist ./docs/.vitepress/canvas-editor-docs
24+
- name: Copy folder content recursively to remote
25+
uses: appleboy/[email protected]
26+
with:
27+
source: docs/.vitepress/canvas-editor-docs
28+
target: ${{ secrets.DOCS_PATH }}
29+
host: ${{ secrets.HOST }}
30+
username: ${{ secrets.USERNAME }}
31+
password: ${{ secrets.PASSWORD }}
32+
overwrite: true
33+
strip_components: 2

0 commit comments

Comments
 (0)