Skip to content

Commit

Permalink
update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
LDannijs committed Jun 3, 2024
1 parent 780e8da commit 3c52308
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
- name: Install Node.js dependencies
run: npm ci
- name: Create templates.csv
run: node csv.js
run: node bin/csv.js
- name: Upload to Airtable
run: |
curl -X POST ${{ secrets.AIRTABLE_WEBHOOKS_API_ENDPOINT }} \
Expand Down
4 changes: 2 additions & 2 deletions bin/csv.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ const { createObjectCsvWriter } = require('csv-writer');

// Define paths to the templates.yml file and the directory containing the template files
const templatesYmlPath = path.join(__dirname, '..', 'templates.yml');
const templatesDir = (__dirname, '..');
const templatesDir = path.join(__dirname, '..');

// Read and parse the templates.yml file
const templatesYml = fs.readFileSync(templatesYmlPath, 'utf8');
const templateNames = yaml.parse(templatesYml);

// Define the CSV writer
const csvWriter = createObjectCsvWriter({
path: 'templates.csv',
path: path.join(__dirname, 'templates.csv'),
header: [
{ id: 'name', title: 'Name' },
{ id: 'description', title: 'Description' },
Expand Down

0 comments on commit 3c52308

Please sign in to comment.