-
Notifications
You must be signed in to change notification settings - Fork 1
49 lines (41 loc) · 1.37 KB
/
build.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
name: Hugo Build
on:
push:
branches:
- master
workflow_dispatch:
# We have several possible workflows:
# - Push to master (regular static site generator)
# - Label an issue as "published" by the repo owner
# - Edit an issue which is "published" by the repo owner
jobs:
build:
# To see available associations: https://developer.github.com/v4/enum/commentauthorassociation/
# Be careful that if this is left too open, it could result in arbitrary file
# upload, as the filename is directly derived from the issue title
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3
with:
repository: dzervas/notion-markdown
path: notion-markdown
- name: Setup NPM
uses: actions/setup-node@v1
- name: Install dependencies
run: npm ci
- name: Hugo setup
uses: peaceiris/actions-hugo@v2
with:
extended: true
- name: Download notion pages
run: notion-markdown/getter.py -c content/post -d static/img -u /img ${{ secrets.NOTIONDB_ID }}
- name: Build site
run: hugo --minify --gc
- name: Deploy to gh-pages
uses: peaceiris/actions-gh-pages@v3
with:
deploy_key: ${{secrets.ACTIONS_DEPLOY_KEY}}
publish_branch: gh-pages
publish_dir: ./public
force_orphan: true