forked from atsign-foundation/atsign.dev
-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (46 loc) · 1.36 KB
/
DeployProd.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
47
48
49
50
51
52
53
name: DeployProd
on:
workflow_dispatch:
push:
tags:
- '*.*.*'
jobs:
deploy:
if: ${{ github.repository == 'atsign-foundation/atsign.dev' }}
runs-on: ubuntu-20.04
steps:
- name: Git checkout
uses: actions/checkout@v2
with:
submodules: recursive # To get theme and theme deps
fetch-depth: 0
- name: Setup hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: "0.83.1"
extended: true # Complex themes need Hugo Extended
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '14'
- name: Cache dependencies
uses: actions/[email protected]
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Prepare postcss-cli
run: npm ci
- name: Build
run: hugo --minify
env:
HUGO_ENV: production
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
personal_token: ${{ secrets.REPO_TOKEN }}
external_repository: atsign-foundation/atsign.dev-prod
publish_dir: ./public
publish_branch: gh-pages
cname: atsign.dev