Update update-api.js

This commit is contained in:
Aleksandr Statciuk 2022-01-19 22:08:45 +03:00
parent 9e45139883
commit 3b4db94206
3 changed files with 16 additions and 11 deletions

View file

@ -86,8 +86,16 @@ jobs:
path: scripts/logs path: scripts/logs
- uses: actions/upload-artifact@v2 - uses: actions/upload-artifact@v2
with: with:
name: gh-pages name: channels.json
path: .gh-pages path: .gh-pages/api/channels.json
- uses: actions/upload-artifact@v2
with:
name: programs.json
path: .gh-pages/api/programs.json
- uses: actions/upload-artifact@v2
with:
name: guides
path: .gh-pages/guides
- run: node scripts/commands/update-readme.js - run: node scripts/commands/update-readme.js
- run: git add README.md - run: git add README.md
- run: git commit -m "[Bot] Update README.md" - run: git commit -m "[Bot] Update README.md"

View file

@ -6,10 +6,7 @@ const API_DIR = process.env.API_DIR || '.gh-pages/api'
async function main() { async function main() {
await generateChannelsJson() await generateChannelsJson()
await generateProgramsJson()
// Reason: File api/programs.json is 419.08 MB; this exceeds GitHub's file size limit of 100.00 MB
// await generateProgramsJson()
logger.info(`Done`) logger.info(`Done`)
} }

View file

@ -32,12 +32,12 @@ it('can generate channels.json', () => {
expect(output).toBe(expected) expect(output).toBe(expected)
}) })
// it('can generate programs.json', () => { it('can generate programs.json', () => {
// const output = content('tests/__data__/output/api/programs.json') const output = content('tests/__data__/output/api/programs.json')
// const expected = content('tests/__data__/expected/api/programs.json') const expected = content('tests/__data__/expected/api/programs.json')
// expect(output).toBe(expected) expect(output).toBe(expected)
// }) })
function content(filepath) { function content(filepath) {
const data = fs.readFileSync(path.resolve(filepath), { const data = fs.readFileSync(path.resolve(filepath), {