-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (46 loc) · 1.1 KB
/
ci.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
name: CI
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
name: Build, test, publish
steps:
- uses: actions/checkout@v2
with:
submodules: true
- uses: actions/setup-node@v2
with:
node-version: '17'
- name: Build 00-simple
working-directory: 00-simple
run: |
npm install
node_modules/.bin/webpack
- name: Build 01-api
working-directory: 01-api
run: |
npm install
npm run dev
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: 'latest'
extended: true
- name: Build Hugo site
run: |
mkdir hugo/content
cp -r 00-simple/dist hugo/content/00-simple
cp -r 00-simple/images hugo/content/00-simple/
cp -r 01-api/dist hugo/content/01-api
cd hugo
hugo new index.md
cat ../README.md >> content/index.md
hugo -D
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./hugo/public