Skip to content

Build Example Repo #339

Build Example Repo

Build Example Repo #339

Workflow file for this run

name: Build Example Repo
on:
push:
branches:
- main
schedule:
# <minute [0,59]> <hour [0,23]> <day of the month [1,31]> <month of the year [1,12]> <day of the week [0,6]>
# https://pubs.opengroup.org/onlinepubs/9699919799/utilities/crontab.html#tag_20_25_07
# Run every Monday at 23:26:00 UTC (Monday at 15:26:00 PST)
# We offset from the hour and half hour to go easy on the servers :)
- cron: '26 23 * * 1'
jobs:
build-repo:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Setup languages
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '16.x'
# Run cookiecutter
- name: Install Cookiecutter
run: |
pip install cookiecutter
- name: Generate Repo
run: |
cookiecutter . --no-input
rm -Rf example/.github/workflows/
# Check Python
- name: Install Python Dependencies
run: |
cd example/python/
pip install .[test]
- name: Lint and Format Python
run: |
cd example/python/
flake8 cdp_example_backend --count --verbose --show-source --statistics
black --check cdp_example_backend
# Check Web
- name: Install Web App Dependencies
run: |
cd example/web/
npm i
- name: Build Web App
run: |
cd example/web/
npm run build
# Publish the generated repo
- name: Publish Docs
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: example/