A GitHub Action that creates a Farcaster-friendly static page from README.md.
.github/workflows/gh-frame.yml
:name: Build Farcaster-friendly Repo Page
on:
push:
branches:
- main # or 'master' or whatever your main branch is
paths:
- "README.md"
pull_request:
branches:
- main
paths:
- "README.md"
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: write
pages: write
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Generate Farcaster-friendly Page
uses: vrypan/gh-frame@v2.0.1
with:
token: ${{ secrets.GITHUB_TOKEN }} # Default GitHub token
style: light # light/dark/custom
# Optionally set cname or branch_name if you want:
# cname: yourdomain.com
# branch_name: gh-frame
gh-frame
branch as the sourceYour page will be available at:
- https://<username>.github.io/<repository>
- Or at your custom domain if configured
The action automatically fetches the social sharing image generated by GitHub
for your repo. It will add some white padding to make it look nice as a frame
preview (preview image ideal size is 1200x800, OpenGraph GitHub image is 1200x600).
You can set the action parameter style
to light
, dark
, or custom
.
If you set it to custom, this action will respect styles.css
found in your
gh-frame
repo, so you can use your own.
MIT
View on GitHub