Skip to content

Commit

Permalink
chore: update build.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Hufe921 committed Jul 6, 2024
1 parent 24df9d3 commit 63d7b00
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 43 deletions.
50 changes: 25 additions & 25 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,28 +15,28 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm i yarn -g
- run: yarn
- run: yarn run build
- run: mv dist canvas-editor
- name: Copy folder content recursively to remote
uses: garygrossgarten/github-action-scp@release
with:
local: canvas-editor
remote: ${{ secrets.PATH }}
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
rmRemote: true
- name: Executing remote ssh commands
uses: appleboy/ssh-action@v1.0.3
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
script: sed -i 's/<\/body>/${{ secrets.SCRIPT }}<\/body>/g' ${{ secrets.PATH }}/index.html
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm i yarn -g
- run: yarn
- run: yarn run build
- run: mv dist canvas-editor
- name: Copy folder content recursively to remote
uses: appleboy/scp-action@v0.1.7
with:
source: canvas-editor
target: ${{ secrets.PATH }}
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
overwrite: true
- name: Executing remote ssh commands
uses: appleboy/ssh-action@v1.0.3
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
script: sed -i 's/<\/body>/${{ secrets.SCRIPT }}<\/body>/g' ${{ secrets.PATH }}/canvas-editor/index.html
38 changes: 20 additions & 18 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,30 @@ on:
push:
branches: [main]
paths:
- '.github/workflows/docs.yml'
- 'docs/**'

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm i yarn -g
- run: yarn
- run: yarn run docs:build
- run: mv ./docs/.vitepress/dist ./docs/.vitepress/canvas-editor-docs
- name: Copy folder content recursively to remote
uses: garygrossgarten/github-action-scp@release
with:
local: ./docs/.vitepress/canvas-editor-docs
remote: ${{ secrets.DOCS_PATH }}
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
rmRemote: true
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm i yarn -g
- run: yarn
- run: yarn run docs:build
- run: mv ./docs/.vitepress/dist ./docs/.vitepress
- run: cd ./docs/.vitepress
- name: Copy folder content recursively to remote
uses: appleboy/scp-action@v0.1.7
with:
source: canvas-editor-docs
target: ${{ secrets.DOCS_PATH }}
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
overwrite: true

0 comments on commit 63d7b00

Please sign in to comment.