This repository was archived by the owner on Jun 8, 2026. It is now read-only.
publish-stories #31
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Publish stories from Airtable | |
| on: | |
| workflow_dispatch: | |
| repository_dispatch: | |
| types: [publish-stories] | |
| permissions: | |
| contents: write | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| - name: Publish approved Airtable stories | |
| env: | |
| AIRTABLE_BASE_ID: ${{ secrets.AIRTABLE_BASE_ID }} | |
| AIRTABLE_TABLE_NAME: ${{ secrets.AIRTABLE_TABLE_NAME }} | |
| AIRTABLE_TOKEN: ${{ secrets.AIRTABLE_TOKEN }} | |
| AIRTABLE_VIEW_NAME: ${{ secrets.AIRTABLE_VIEW_NAME }} | |
| SEMRUSH_API_KEY: ${{ secrets.SEMRUSH_API_KEY }} | |
| SEMRUSH_DATABASE: ${{ secrets.SEMRUSH_DATABASE }} | |
| run: node scripts/publish-airtable.js | |
| - name: Commit generated feed | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| git add data/stories.json | |
| git diff --cached --quiet && exit 0 | |
| git commit -m "Publish stories from Airtable" | |
| git push |