Skip to content

Commit

Permalink
Merge pull request #8 from baudelotphilippe/workflow
Browse files Browse the repository at this point in the history
Create nextjs.yml
  • Loading branch information
baudelotphilippe authored Mar 1, 2023
2 parents 3cbd349 + a0d2a8a commit 759296a
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 12 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/nextjs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
on: push

jobs:
build:
name: Test workflow_dispatch
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
node-version: '16'
- name: Node Install
run: npm ci
- name: run compil
run: node scripts/compil.js
- name: Commit files
run: |
git config user.name github-actions
git config user.email github-actions@github.com
git add --all
if [ -n "$(git status --porcelain)" ]; then
git commit -am "Update compil file"
fi
git push
2 changes: 1 addition & 1 deletion events/events.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[{"name":"Digital Expresso : AU SECOURS ! JE DOIS RÉALISER UN CAHIER DES CHARGES WEB","startDate":"2023-3-7T08-08-30-00","location":{"addressLocality":"","streetAddress":"","location":""},"organizer":""},{"name":"The Adventures of Kira and Morrison","startDate":"2025-07-21T19:00-05:00","location":{"addressLocality":"Snickertown","streetAddress":"100 West Snickerpark Dr","location":"Snickerpark Stadium"},"organizer":"Kira and Morrison Music"}]
[{"name":"TEST modif - Digital Expresso : AU SECOURS ! JE DOIS RÉALISER UN CAHIER DES CHARGES WEB","startDate":"2023-3-7T08-08-30-00","location":{"addressLocality":"","streetAddress":"","location":""},"organizer":""},{"name":"The Adventures of Kira and Morrison","startDate":"2025-07-21T19:00-05:00","location":{"addressLocality":"Snickertown","streetAddress":"100 West Snickerpark Dr","location":"Snickerpark Stadium"},"organizer":"Kira and Morrison Music"}]
4 changes: 2 additions & 2 deletions events/files/pwn_1.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script type="application/ld+json">
{ "@context": "http://schema.org",
"@type": "Event",
"name": "Digital Expresso : AU SECOURS ! JE DOIS RÉALISER UN CAHIER DES CHARGES WEB",
"name": "TEST modif - Digital Expresso : AU SECOURS ! JE DOIS RÉALISER UN CAHIER DES CHARGES WEB",
"startDate": "2023-3-7T08-08-30-00",
"endDate": "2023-3-7T10-10-00-00",
"image":"https://www.cobaltpoitiers.fr/wp-content/uploads/2023/02/DE-300x300.jpg",
Expand All @@ -12,4 +12,4 @@


// pb des "" dans name et description
// pb de , en trop à la fin
// pb de , en trop à la fin
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions scripts/compil.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const fs= require('fs');
const cheerio = require('cheerio');
const eventsFolder = '../events/files/';
const eventsFolder = './events/files/';


const jsonsDir = fs.readdirSync(eventsFolder);
Expand All @@ -25,5 +25,5 @@ jsonsDir.forEach( file => {
})

// console.log(newContent)
fs.writeFileSync('../events/events.json', JSON.stringify(newContent))
fs.writeFileSync('./events/events.json', JSON.stringify(newContent))

1 comment on commit 759296a

@vercel
Copy link

@vercel vercel bot commented on 759296a Mar 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.