Skip to content

move the link to the AI tips #1391

move the link to the AI tips

move the link to the AI tips #1391

Workflow file for this run

name: Publish school-specific branches / site versions
on: push
# cancel any previous builds
concurrency:
group: schools-${{ github.ref }}
cancel-in-progress: true
jobs:
schools:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
school:
- columbia
- nyu
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: ./.github/actions/setup
# avoid force pushes on school branches by merging main but then only committing the processed files
- name: Configure Git
run: |
git config --global user.name "GitHub Actions"
git config --global user.email "alf9@nyu.edu"
- name: Switch to school branch
run: git switch ${{ matrix.school }}
- name: Merge from base branch
run: git merge -s ours --no-commit --no-ff ${{github.ref_name}}
- name: Restore files from base branch
# https://stackoverflow.com/a/68636946/358804
run: git restore --source ${{github.ref_name}} --worktree --staged -- .
- name: Commit preliminary changes
run: |
git add -A
git commit -m "CI: render for school"
# can be used for troubleshooting
# - name: Store merged source
# uses: actions/upload-artifact@v6
# with:
# name: ${{ matrix.school }}-src
# path: ./
- name: Render for school
run: ./extras/scripts/school_ci.sh ${{ matrix.school }}
- name: Fix double-escaping
run: make fix_double_escaping
- name: Update commit
run: |
git add -A
git commit --amend --no-edit
- name: Push branch
run: git push origin ${{ matrix.school }}
if: github.ref_name == 'main'
- name: Store rendered HTML for link checking
uses: actions/upload-artifact@v6
with:
name: ${{ matrix.school }}
path: _build/html
# do this as a separate job from link checking so that broken external links don't block the site build
check_links:
runs-on: ubuntu-latest
needs: schools
strategy:
fail-fast: false
matrix:
school:
- columbia
- nyu
steps:
- name: Install Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "3"
- name: Install dependencies
run: gem install html-proofer
- uses: actions/checkout@v6
- uses: actions/download-artifact@v7
with:
name: ${{ matrix.school }}
path: _build/html
- name: Check for broken links
run: ruby extras/scripts/broken_links.rb