Skip to content

CI

CI #210

Workflow file for this run

name: CI
on:
push:
workflow_dispatch:
repository_dispatch:
schedule:
- cron: '0 5 * * *'
jobs:
build_json:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
repository: rdmorganiser/rdmo-catalog
- name: Use Python 3.8
uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Run convert.py
run: python tools/convert.py json
- name: Archive artifact
uses: actions/upload-artifact@v2
with:
name: json
path: json
retention-days: 1
build:
runs-on: ubuntu-latest
needs: build_json
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Download artifact
uses: actions/download-artifact@v2
with:
name: json
path: src/data
- name: Use node v10.16.2
uses: actions/setup-node@v2
with:
node-version: 'v10.16.2'
- name: Install
run: npm install
- name: Build
run: npm run build
- name: Archive artifact
uses: actions/upload-artifact@v2
with:
name: dist
path: dist
retention-days: 1
deploy:
runs-on: ubuntu-latest
needs: build
if: github.ref == 'refs/heads/master'
steps:
- name: Download artifact
uses: actions/download-artifact@v2
with:
name: dist
path: dist
- name: Deploy
uses: JamesIves/github-pages-deploy-action@3.7.1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: dist