-
Notifications
You must be signed in to change notification settings - Fork 1
66 lines (55 loc) · 1.56 KB
/
Copy pathbuild.yml
File metadata and controls
66 lines (55 loc) · 1.56 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
name: Funny Cat
on:
- push
jobs:
buildstatic:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v1
with:
node-version: 18.x
- name : Prepare NodePack
run: |
npm add cnpm --global
npm install
- name: Cache node modules
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: 0.129.0
extended: true
- name: Generate Link List
run: |
node ./scripts/before/friendsData.js
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_ACCESS_ACCESS_KEY: ${{ secrets.AWS_ACCESS_ACCESS_KEY }}
- name: Generate Hugo
run: |
hugo --minify
- name: Commit sitemap to Baidu
run: |
node ./scripts/after/sitemapCommit "./public/sitemap.xml" "${{ secrets.BAIDU_ZZT_URL }}"
- name: Static Files Pre Set
run: |
node ./scripts/after/fileExtened
- name: NPM Publish Pre Set
run: |
node ./scripts/after/pkgUpdate
- name: NPM Publish
run: |
npm config set _authToken=${{ secrets.NPM_T }}
npm config fix
cd ./public
ls
npm publish --access=public
- name: Refresh cache
run: |
cnpm sync @floatsheep/fsl-blog