-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (43 loc) · 1.25 KB
/
deployment.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
name: Deployment
on:
push:
branches: [ master ]
# paths-ignore: [ .github/workflows/** ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.13]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Build
run: |
npm install --force
npm run build:deploy
- name: Copy 404
run: cp ./dist/blog/browser/browser/index.html ./dist/blog/browser/browser/404.html
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ github.token }}
publish_dir: ./dist/blog/browser/browser
publish_branch: gh-pages
- name: Purge Cloudflare Cache
uses: jakejarvis/cloudflare-purge-action@master
env:
CLOUDFLARE_ZONE: ${{ secrets.CLOUDFLARE_ZONE }}
CLOUDFLARE_TOKEN: ${{ secrets.CLOUDFLARE_TOKEN }}
- name: Telegram Notify
if: always()
uses: appleboy/telegram-action@master
with:
to: ${{ secrets.TELEGRAM_CHAT_ID }}
token: ${{ secrets.TELEGRAM_TOKEN }}
message: |
New Deployment
Status: ${{ job.status }}