-
Notifications
You must be signed in to change notification settings - Fork 9
54 lines (47 loc) · 1.35 KB
/
deploy.yml
File metadata and controls
54 lines (47 loc) · 1.35 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
name: Deploy to gh-pages
on:
push:
branches:
- main
workflow_dispatch:
schedule:
- cron: '0 6 * * *'
permissions:
contents: write
env:
GH_STATS_TOKEN: ${{ secrets.GH_STATS_TOKEN }}
jobs:
gh-pages-deploy:
name: Deploying to gh-pages
runs-on: ubuntu-latest
steps:
- name: Checkout branch
uses: actions/checkout@v4
- name: Clean install dependencies
run: npm install
- name: Data Script
env:
FETCH_SCRIPT: ${{ secrets.FETCH_SCRIPT }}
run: |
echo "$FETCH_SCRIPT" > ./src/data/fetch_data.sh
chmod +x ./src/data/fetch_data.sh
./src/data/fetch_data.sh
- name: Build
run: npm run build
- name: Files stats /dist
run: |
echo "Total file count in /dist:"
find ./dist -type f | wc -l
echo "Total size of files in /dist:"
du -sh ./dist
echo "Individual file sizes in /dist:"
find ./dist -type f -exec du -h {} +
- name: Purge
run: npm run purge
- name: deploy
uses: peaceiris/actions-gh-pages@v3.9.3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'