-
Notifications
You must be signed in to change notification settings - Fork 792
42 lines (40 loc) · 1.15 KB
/
build_and_deploy_history.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
name: Website History Deploy
on:
push:
branches:
- 'history/**'
jobs:
deploy_main:
runs-on: ubuntu-latest
name: Build and Deploy To Main
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: '16'
- name: Setup Docsy
run: git submodule update --init --recursive && sudo npm install -D --save autoprefixer && sudo npm install -D --save postcss-cli
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.121.2'
extended: true
- name: Build
env:
HUGO_ENV: production
run: hugo mod clean && hugo --minify
- name: Copy htaccess files
run: cp .htaccess ./public
- name: Copy other files
run: cp .asf.yaml ./public
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: ${{ github.ref_name }}-staging
publish_dir: ./public
keep_files: true