Update Google Fonts #175
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update Google Fonts | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 12 1 * *' | |
permissions: | |
contents: read | |
env: | |
GIT_AUTHOR_EMAIL: [email protected] | |
GIT_AUTHOR_NAME: googleforcreators-bot | |
GIT_COMMITTER_EMAIL: [email protected] | |
GIT_COMMITTER_NAME: googleforcreators-bot | |
jobs: | |
update-fonts: | |
name: Update Google Fonts | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@8ca2b8b2ece13480cda6dacd3511b49857a23c09 | |
with: | |
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs | |
- name: Checkout | |
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 | |
with: | |
token: ${{ secrets.GOOGLEFORCREATORS_BOT_TOKEN }} | |
- name: Setup Node | |
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d | |
with: | |
node-version-file: '.nvmrc' | |
cache: npm | |
- name: Install dependencies | |
run: npm ci | |
env: | |
PUPPETEER_SKIP_DOWNLOAD: true | |
- name: Setup Bun | |
uses: oven-sh/setup-bun@c7179230d018dd38c919d10d3be7fcd666ab3304 | |
with: | |
bun-version: latest | |
- name: Update list of Google Fonts | |
env: | |
GOOGLE_FONTS_API_KEY: ${{ secrets.GOOGLE_FONTS_API_KEY }} | |
run: npm run workflow:fonts | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@153407881ec5c347639a548ade7d8ad1d6740e38 | |
with: | |
token: ${{ secrets.GOOGLEFORCREATORS_BOT_TOKEN }} | |
commit-message: Update list of Google Fonts | |
title: Update list of Google Fonts | |
body: Fetched the currently available fonts on Google Fonts to update them in the project. | |
branch: update/google-fonts | |
labels: Dependencies |