Skip to content

Update data

Update data #59

name: Update data
on:
schedule:
- cron: '0 0 * * 0' # At 00:00 on Sunday.
workflow_dispatch:
jobs:
update:
if: github.repository == 'svelte-society/sveltesociety.dev'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Update github data
run: node scripts/updateGithub.js
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Update gitlab data
run: node scripts/updateGitlab.js
- name: Update npm data
run: node scripts/updateNpm.js
- name: Update publint data
run: node scripts/updatePublint.js
- name: Run format
run: pnpm run format
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
commit-message: '(AUTO) Update data'
title: '🤖 Update data'
body: Automatically fetch latest data from GitHub, GitLab, NPM and Publint.
branch: ci-update-data
add-paths: src/lib/data/github.json,src/lib/data/gitlab.json,src/lib/data/npm.json,src/lib/data/publint.json
delete-branch: true
token: ${{ secrets.GITHUB_TOKEN }}