-
Notifications
You must be signed in to change notification settings - Fork 8
32 lines (31 loc) · 936 Bytes
/
docs-deployment.yml
File metadata and controls
32 lines (31 loc) · 936 Bytes
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
name: Deploy documentation website
on:
push:
branches:
- master
paths:
- docs/**
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install Node.js
uses: actions/setup-node@master
- name: Install dependencies
working-directory: ./docs
run: npm install
- name: Build documentation website
working-directory: ./docs
run: npm run build
- name: Install SSH Key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.SSH_PRIVATE_KEY }}
known_hosts: 'placeholder'
- name: Add known hosts
run: ssh-keyscan -H ${{ secrets.SSH_HOST }} >> ~/.ssh/known_hosts
- name: Deploy to server
working-directory: ./docs
run: scp -r build/* ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }}:${{ secrets.SSH_DOCS_PATH }}