-
Notifications
You must be signed in to change notification settings - Fork 20
55 lines (44 loc) · 1.29 KB
/
generate-site.yml
File metadata and controls
55 lines (44 loc) · 1.29 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
name: Build and deploy site
on:
push:
branches: [main]
schedule:
- cron: '0 8 * * *'
workflow_dispatch:
jobs:
build:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Check-out the repository
uses: actions/checkout@v4
with:
token: ${{ github.token }}
- name: Install dependencies
if: ${{ github.event_name == 'push' }}
run: npm ci
- name: Install dependency updates
if: ${{ github.event_name != 'push' }}
run: |
npx npm-check-updates -u
npm install
npm update web-features
- name: Update timeline stats
run: node update-timeline-stats.js
- name: Commit dependency changes
if: ${{ github.event_name != 'push' }}
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add .
git commit -m "Bump deps" --allow-empty
git push origin main
- name: Generate site
run: npm run build
- name: Generate pagefind index
run: npm run pagefind
- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: docs