Repository navigation
65 lines (60 loc) · 1.7 KB
/
Copy pathdeploy.yml
File metadata and controls
65 lines (60 loc) · 1.7 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
name: Deploy to GitHub Pages
on:
push:
branches: [main]
schedule:
- cron: '30 4 * * 1'
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-node@v5
with:
node-version: 24
cache: npm
- run: npm ci
- name: Restore Google Fonts ttf cache
uses: actions/cache@v4
with:
path: gf-ttf-cache
key: gf-ttf-v1-${{ github.run_id }}
restore-keys: |
gf-ttf-v1-
- name: Analyze Google Fonts features (offline)
env:
GOOGLE_FONTS_API_KEY: ${{ secrets.GOOGLE_FONTS_API_KEY }}
GF_TTF_DIR: gf-ttf-cache
run: node scripts/analyze-google-fonts.mjs
- name: Fetch Google Fonts descriptions (sparse clone)
continue-on-error: true
run: |
git clone --filter=blob:none --no-checkout --depth 1 https://github.com/google/fonts gf-repo
git -C gf-repo sparse-checkout set --no-cone '**/DESCRIPTION.*.html'
git -C gf-repo checkout
- name: Fetch Google Fonts catalog
env:
GOOGLE_FONTS_API_KEY: ${{ secrets.GOOGLE_FONTS_API_KEY }}
GF_DESC_DIR: gf-repo
run: node scripts/fetch-google-fonts.mjs
- run: npm run build
- uses: actions/upload-pages-artifact@v4
with:
path: dist
deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
uses: actions/deploy-pages@v4