-
Notifications
You must be signed in to change notification settings - Fork 2
46 lines (39 loc) · 993 Bytes
/
docs.yml
File metadata and controls
46 lines (39 loc) · 993 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: Publish Docs
on:
workflow_dispatch:
push:
branches:
- main
paths:
- docs/**
- website/**
- .github/workflows/docs.yml
jobs:
publish-docs:
runs-on: ubuntu-latest
environment:
name: Docs
url: https://lemoncode.github.io/react-image-focal-point
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Add NPM registry
uses: actions/setup-node@v3
with:
node-version: 18.x
- name: Use SSH key
run: |
mkdir -p ~/.ssh/
echo "${{secrets.SSH_PRIVATE_KEY}}" > ~/.ssh/id_rsa
sudo chmod 600 ~/.ssh/id_rsa
- name: Config git
run: |
git config --global user.email "docs@lemoncode.net"
git config --global user.name "Docs bot"
- name: Install
run: npm ci
- name: Publish Docs
run: |
cd ./website
npm run build
USE_SSH=true npm run deploy