Skip to content
name: Validate, Update, and Deploy
on:
push:
branches:
- ci-test
pull_request:
branches:
- ci-test
schedule:
- cron: "45 1 * * *"
jobs:
validate-projects-yaml:
runs-on: ubuntu-latest
steps:
- name: Check out the code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.12
- name: Install dependencies
run: pip install -r requirements.txt
- name: Validate projects YAML file
run: python -u tools/check_projects_yaml.py
test-chert:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.12
- name: Install dependencies
run: pip install -r requirements.txt
- name: Render site
run: chert render
update-and-deploy:
if: github.ref == 'refs/heads/ci-test'
needs:
- validate-projects-yaml
- test-chert
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- uses: actions/setup-python@v5
with:
python-version: 3.12
- name: Install dependencies
run: pip install -r requirements.txt
- name: Generate updated projects.json file
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: python -u tools/gen_projects_json.py
# - name: Publish new site
# run: python -c "print('chert publish here...')"
# - name: Commit and Push Changes
# run: |
# git config --global user.name "github-actions[bot]"
# git config --global user.email "github-actions[bot]@users.noreply.github.com"
# git add projects.json
# git commit -m "chore: update project.json"
# git push origin master