-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (39 loc) · 1.05 KB
/
deploy.yaml
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: Auto Deploy
on:
push:
branches:
- main
workflow_dispatch:
schedule:
- cron: '0 0 */5 * *'
jobs:
deploy:
if: ${{ github.repository_owner == 'plainheart' }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18
registry-url: https://registry.npmjs.org/
- name: Cache node modules
id: cache
uses: actions/cache@v4
env:
cache-name: cache-node-modules
with:
path: '**/node_modules'
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: npm ci
- name: Build Offline Documentation
run: npm run build
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: dist
clean: true