forked from atsign-foundation/docs.atsign.com
-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (40 loc) · 1.34 KB
/
DeployProduction.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
47
48
name: Deploy Production
on:
workflow_dispatch:
push:
tags:
- '*.*.*'
env:
URL: 'docs.atsign.com'
permissions: # added using https://github.com/step-security/secure-workflows
contents: read
jobs:
deploy:
if: ${{ github.repository == 'atsign-foundation/docs.atsign.com' }}
runs-on: ubuntu-20.04
steps:
- name: Git checkout
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
- name: Setup Node
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
with:
node-version: '16'
- name: Cache dependencies
uses: actions/cache@58c146cc91c5b9e778e71775dfe9bf1442ad9a12 # v3.2.3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install dependencies
run: npm ci
- name: Build Production
run: npm run build:production
- name: Deploy Production
uses: peaceiris/actions-gh-pages@bd8c6b06eba6b3d25d72b7a1767993c0aeee42e7 # v3.9.2
with:
personal_token: ${{ secrets.MY_GITHUB_TOKEN }}
external_repository: atsign-foundation/docs.atsign.com-prod
publish_dir: ./public
publish_branch: gh-pages
cname: ${{ env.URL }}