-
Notifications
You must be signed in to change notification settings - Fork 9
43 lines (36 loc) · 1014 Bytes
/
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
name: 'Deploy docs'
on:
push:
branches: [master]
jobs:
deploy:
name: 'Deploy docs with npm run deploy'
permissions:
contents: write
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Node 20
uses: actions/setup-node@v3
with:
node-version: 20
cache: npm
- name: Cache packages
uses: actions/cache@v3
with:
key: docs-cache-${{ hashFiles('package-lock.json') }}
path: |
.docusaurus
- name: Install packages
run: npm ci
- name: Build the docs
run: npm run build
- name: Deploy docs to terser/terser.github.io
uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/master'
with:
publish_dir: ./build
external_repository: terser/terser.github.io
publish_branch: master
deploy_key: ${{ secrets.TERSER_ORG_DEPLOY_KEY }}