-
Notifications
You must be signed in to change notification settings - Fork 14
42 lines (35 loc) · 1.15 KB
/
deploy-craft-v3.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
# DOCUMENT_ROOT is the file path on the server up to the public folder
# with a trailing slash. Add 'public/' to target public folder.
# /server/path_html (default)
# TARGET: ${{ secrets.DOCUMENT_ROOT }}/public/docs/craft-v2/ (subfolder)
name: Deploy v3 Docs
on:
workflow_dispatch:
push:
branches:
- craft-v3
jobs:
build_and_deploy_files:
name: Run build script and deploy files
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.inputs.ref || github.ref }}
- name: Install Node.js
uses: actions/setup-node@v1
with:
node-version: '16.x'
- name: Install npm dependencies
run: npm install
- name: Run build task
run: npm run docs:build
- name: Deploy files to server
uses: easingthemes/[email protected]
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
REMOTE_HOST: ${{ secrets.REMOTE_HOST }}
REMOTE_USER: ${{ secrets.REMOTE_USER }}
TARGET: ${{ secrets.DOCUMENT_ROOT }}docs/craft-v3/
ARGS: "-rltgoDzvO --delete"
SOURCE: "docs/.vuepress/dist/"