-
Notifications
You must be signed in to change notification settings - Fork 12
46 lines (38 loc) · 1.12 KB
/
docs.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
43
44
45
46
name: Deploy Documentation To GitHub Pages
# v1.0.0
#
# This workflow runs `npm run build` and then syncs the `build` folder to GitHub Pages.
on:
push:
branches: [ production ]
jobs:
deploy:
name: Build & Deploy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: webfactory/[email protected]
env:
SSH_KEY: ${{ secrets.SSH_KEY }}
if: env.SSH_KEY != null
with:
ssh-private-key: ${{ env.SSH_KEY }}
# Setup
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
registry-url: 'https://npm.pkg.github.com'
- name: Install modules
run: npm clean-install --audit=false
env:
GITHUB_TOKEN: ${{ secrets.HOMEY_GITHUB_ACTIONS_BOT_PERSONAL_ACCESS_TOKEN }}
# Build
- name: Build
run: npm run build
# Deploy
- name: Deploy To GitHub Pages
uses: peaceiris/[email protected]
with:
personal_token: ${{ secrets.HOMEY_GITHUB_ACTIONS_BOT_PERSONAL_ACCESS_TOKEN }}
publish_dir: ./build