-
Notifications
You must be signed in to change notification settings - Fork 13
63 lines (52 loc) · 1.46 KB
/
legacy.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
54
55
56
57
58
59
60
61
62
63
name: Hexo Deploy Legacy
on:
push:
branches:
- source
env:
POST_ASSET_IMAGE_CDN: false
BLOG_MIGRATION_NOTICE: true
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Checkout theme repo
uses: actions/checkout@v4
with:
repository: prinsss/hexo-theme-murasaki
ref: master
path: themes/murasaki
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- name: Cache pnpm modules
uses: actions/cache@v3
id: pnpm-cache
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-
- name: Set up pnpm and install dependencies
uses: pnpm/action-setup@v2
with:
version: 8.10.2
run_install: |
args: [--prefer-offline, --frozen-lockfile]
- name: Set up environment
env:
DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }}
run: |
sudo timedatectl set-timezone "Asia/Shanghai"
mkdir -p ~/.ssh
echo "$DEPLOY_KEY" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan github.com >> ~/.ssh/known_hosts
- name: Set up Pandoc
uses: nikeee/setup-pandoc@v1
- name: Deploy
run: |
npx hexo deploy --generate