-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (55 loc) · 1.74 KB
/
deploy.yaml
File metadata and controls
67 lines (55 loc) · 1.74 KB
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: deploy
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
submodules: true # Fetch Hugo themes (true OR recursive)
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20.18.1'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Fetch blogcard OGP data
run: npm run fetch-blogcard-ogp
- name: Commit and push blogcard cache
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add data/blogcard_cache.json
git diff --staged --quiet || git commit -m "Update blogcard OGP cache [skip ci]"
git push
- name: Fetch GitHub activity data
run: npm run fetch-github-activity
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Commit and push GitHub activity data
run: |
git add data/github_activity.json
git diff --staged --quiet || git commit -m "Update GitHub activity data [skip ci]"
git push
- name: Generate OGP images
run: npm run generate-ogp
- name: Setup Hugo
uses: peaceiris/actions-hugo@v3
with:
hugo-version: "0.115.1"
extended: true
- name: Build
run: hugo
- name: Deploy
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
cname: blog.kyu08.com