Skip to content

Updating workflows for new scripts #95

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jan 1, 2025
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/check-snippets.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Checks snippets syntax

on:
pull_request:
paths:
- 'snippets/**'

jobs:
check-snippets:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: "16"

- name: Check if snippets are formated correctly
run: |
node utils/checkSnippetFormatting.js # Run the script located in the utils/ folder
11 changes: 8 additions & 3 deletions .github/workflows/consolidate-snippets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Consolidate JSON Files
on:
push:
paths:
- "public/data/**"
- "snippets/**"

permissions:
contents: write
Expand All @@ -25,14 +25,19 @@ jobs:
run: |
npm install

- name: Consolidate JSON files
- name: Consolidate Snippets into JSON files
run: |
node utils/consolidate.js # Run the script located in the utils/ folder
node utils/consolidateSnippets.js # Run the script located in the utils/ folder

- name: Consolidate JSON files into merged file
run: |
node utils/consolidate.js

- name: Commit and push changes
run: |
git config --global user.name "GitHub Action"
git config --global user.email "[email protected]"
git add public/data/*
git add public/consolidated/all_snippets.json
git commit -m "Update consolidated snippets"
git push
62 changes: 0 additions & 62 deletions utils/migrateSnippets.js

This file was deleted.