Skip to content

Commit 925201b

Browse files
committed
build: use reusable build and deploy workflow
1 parent d02af9d commit 925201b

File tree

1 file changed

+9
-35
lines changed

1 file changed

+9
-35
lines changed

.github/workflows/deploy.yml

Lines changed: 9 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -6,38 +6,12 @@ on:
66
workflow_dispatch:
77

88
jobs:
9-
build:
10-
runs-on: ubuntu-latest
11-
12-
steps:
13-
- name: Checkout
14-
uses: actions/checkout@v2
15-
16-
- name: Build
17-
run: npm install && npm run build
18-
19-
- name: Upload artifact
20-
uses: actions/upload-artifact@master
21-
with:
22-
name: site
23-
path: ./dist
24-
25-
upload:
26-
runs-on: ubuntu-latest
27-
needs: build
28-
29-
steps:
30-
- name: Download artifact
31-
uses: actions/download-artifact@master
32-
with:
33-
name: site
34-
path: ./dist
35-
36-
- name: Deploy with SSH
37-
uses: easingthemes/[email protected]
38-
with:
39-
SSH_PRIVATE_KEY: ${{ secrets.BIBLYS_ORG_SSH_PRIVATE_KEY }}
40-
REMOTE_HOST: ${{ secrets.BIBLYS_ORG_SSH_HOST }}
41-
REMOTE_USER: ${{ secrets.BIBLYS_ORG_SSH_USER }}
42-
SOURCE: "dist/"
43-
TARGET: "~/docs.biblys.org"
9+
build-and-deploy:
10+
uses: clemlatz/build-and-deploy/.github/workflows/workflow.yml@main
11+
with:
12+
build-output-directory: dist
13+
remote-target-path: ~/docs.biblys.org
14+
secrets:
15+
ssh-private-key: ${{ secrets.BIBLYS_ORG_SSH_PRIVATE_KEY }}
16+
ssh-remote-host: ${{ secrets.BIBLYS_ORG_SSH_HOST }}
17+
ssh-remote-user: ${{ secrets.BIBLYS_ORG_SSH_USER }}

0 commit comments

Comments
 (0)