GitHub Actions Workflow
Telar uses GitHub Actions to automatically build and deploy your site. Understanding this workflow helps you troubleshoot issues and optimize your development process.
What GitHub Actions Does
When you deploy via GitHub Pages, the build process is fully automated. No manual steps required!
User Actions (You)
Edit content directly on GitHub or push from local:
- Edit Google Sheets or CSVs in
components/structures/ - Edit markdown in
components/texts/ - Add images to
components/images/objects/ - Commit and push to main branch
Automated Actions (GitHub)
The workflow (.github/workflows/build.yml) automatically:
- Fetches Google Sheets (if enabled)
- Downloads content from your published Google Sheet
- Converts to CSV format
- Saves to
components/structures/
- Converts CSVs to JSON
- Runs
scripts/csv_to_json.py - Reads CSVs from
components/structures/ - Embeds markdown content from
components/texts/ - Generates JSON files in
_data/for Jekyll
- Runs
- Generates IIIF Tiles
- Runs
scripts/generate_iiif.py - Processes images from
components/images/objects/ - Creates tiled image pyramids in
iiif/objects/ - Generates manifest files
- Runs
- Builds Jekyll Site
- Runs
bundle exec jekyll build - Compiles templates with data
- Outputs to
_site/directory
- Runs
- Deploys to GitHub Pages
- Publishes
_site/directory - Site goes live at your GitHub Pages URL
- Publishes
Build Triggers
The workflow runs automatically when:
- Push to main branch: Any commit triggers a build
- CSV or markdown changes: Content updates deploy immediately
- Config changes:
_config.ymlmodifications rebuild site
Manual Build Trigger
Sometimes you need to rebuild without making code changes (e.g., after editing Google Sheets).
How to Manually Trigger
- Go to your repository on GitHub
- Click Actions tab
- Select Build and Deploy workflow
- Click Run workflow button (top right)
- Select branch (usually
main) - Click green Run workflow button
- Wait 2-5 minutes for completion
When to Trigger Manually
- After editing Google Sheets content
- After adding objects or story steps in Google Sheets
- To rebuild without code changes
- To force a clean build
Workflow File
The workflow is defined in .github/workflows/build.yml:
name: Build and Deploy
on:
push:
branches: [ main ]
workflow_dispatch: # Enables manual trigger
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.0
bundler-cache: true
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies
run: |
bundle install
pip install -r requirements.txt
- name: Fetch Google Sheets (if enabled)
run: python3 scripts/fetch_google_sheets.py
- name: Convert CSVs to JSON
run: python3 scripts/csv_to_json.py
- name: Generate IIIF tiles
run: python3 scripts/generate_iiif.py
- name: Build Jekyll site
run: bundle exec jekyll build
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: $
publish_dir: ./_site
Build Status
Checking Build Status
- Go to Actions tab in your repository
- See list of recent workflow runs
- Green checkmark = successful build
- Red X = failed build
Viewing Build Logs
- Click on a workflow run
- Click on the job name (e.g., “build-and-deploy”)
- Expand steps to see detailed logs
- Use logs to troubleshoot errors
Common Build Errors
CSV Parsing Error
Error: Failed to parse story-1.csv
Solution:
- Check CSV file for syntax errors
- Ensure all required columns are present
- Verify no special characters breaking CSV format
IIIF Generation Error
Error: Failed to process image textile-001.jpg
Solution:
- Verify image file exists in
components/images/objects/ - Check image isn’t corrupted
- Ensure image format is supported (JPG, PNG, TIFF)
Jekyll Build Error
Error: Liquid syntax error
Solution:
- Check markdown files for invalid syntax
- Verify frontmatter is properly formatted
- Look for unclosed tags or brackets
Google Sheets Fetch Error
Error: Failed to fetch Google Sheets
Solution:
- Verify
published_urlis correct in_config.yml - Ensure sheet is published to web (not just shared)
- Check sheet has proper permissions
Build Performance
Typical build times:
- Small sites (< 10 objects, 1-2 stories): 2-3 minutes
- Medium sites (10-50 objects, multiple stories): 3-5 minutes
- Large sites (50+ objects, many stories): 5-10 minutes
Optimizing Build Time
- Use external IIIF for large images (skips tile generation)
- Commit fewer images at once (split large uploads)
- Clean repository periodically (remove unused files)
Troubleshooting
Build Fails Every Time
- Check recent commits for errors
- Review build logs for specific error messages
- Test locally first (
bundle exec jekyll serve) - Revert to last working commit if needed
Build Succeeds But Site Not Updating
- Clear browser cache (hard refresh: Cmd+Shift+R or Ctrl+Shift+R)
- Wait 5 minutes for CDN propagation
- Check GitHub Pages settings (Settings → Pages)
- Verify correct branch is set for Pages deployment
Google Sheets Not Updating
- Manually trigger workflow (see above)
- Verify both shared and published URLs in
_config.yml - Check the sheet is published to web
- Review fetch logs in Actions tab