Skip to content

[Refactor] Reorganize repository structure #14

[Refactor] Reorganize repository structure

[Refactor] Reorganize repository structure #14

Workflow file for this run

name: CI/CD
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '16'
- name: Install dependencies
run: |
npm install -g markdown-link-check
npm install -g prettier
npm install -g jsonschema
- name: Get jsonschema path
id: get_jsonschema_path
run: echo "JSONSCHEMA_PATH=$(npm bin -g)/jsonschema" >> $GITHUB_ENV
- name: Check Markdown links
run: |
find . -name "*.md" -not -path "./node_modules/*" -exec markdown-link-check {} \;
- name: Format Markdown files
run: |
prettier --write "**/*.md"
- name: Validate restaurants.yml
run: |
${JSONSCHEMA_PATH} -i data/restaurants.yml schemas/restaurant.schema.json
- name: Validate shops.yml
run: |
${JSONSCHEMA_PATH} -i data/shops.yml schemas/shop.schema.json
- name: Validate events.yml
run: |
${JSONSCHEMA_PATH} -i data/events.yml schemas/event.schema.json
- name: Deploy to GitHub Pages
if: github.ref == 'refs/heads/main'
uses: JamesIves/github-pages-deploy-action@4.1.4
with:
branch: gh-pages
folder: .