Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,15 @@ on:
workflow_dispatch:
pull_request:
branches: ["main"]
paths:
- "website/**"
permissions:
contents: write

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/capture-blog-ideas.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ permissions:
issues: write
pull-requests: write

concurrency:
group: ${{ github.workflow }}-${{ github.event.issue.number || github.ref }}
cancel-in-progress: true

jobs:
capture:
if: contains(github.event.issue.labels.*.name, 'blog')
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/deploy-to-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ on:
permissions:
contents: write

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
Expand Down
35 changes: 4 additions & 31 deletions .github/workflows/draft-weekly-blog-post.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

41 changes: 29 additions & 12 deletions .github/workflows/draft-weekly-blog-post.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ name: Draft weekly blog post
description: Turn the oldest open blog issue and the repo’s recent activity into a narrative, reader-friendly blog draft for review.
on:
schedule:
- cron: "0 9 * * 3"
- cron: "0 9 * * 3" #wed 9am
workflow_dispatch:
permissions:
contents: read
issues: read
pull-requests: read
permissions: {}
strict: true
concurrency:
group: "gh-aw-${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true
network:
allowed: [defaults, github]
tools:
Expand All @@ -32,19 +32,36 @@ Draft a personal, engaging blog post from the oldest open `blog` issue in this r

Use the repo’s actual activity as grounding, but write as a thoughtful editor and storyteller rather than as a changelog or issue list. The result should read like a real blog post that helps readers understand what changed, why it matters, and what the broader pattern suggests.

## Debug and logging

Before drafting or creating a PR, log the trigger and issue selection state so a missed run is easy to diagnose.

- `echo "event_name=${GITHUB_EVENT_NAME}"`
- `echo "ref=${GITHUB_REF}"`
- `echo "repository=${GITHUB_REPOSITORY}"`
- `echo "workflow_run_id=${GITHUB_RUN_ID}"`
- `gh issue list --label blog --state open --limit 20 --json number,title,url,createdAt`
- `gh issue list --label blog --state open --limit 20 --json number,title,url | jq -r '.[] | "Issue #\(.number): \(.title) | \(.url)"'`
- `gh run list --workflow "Draft weekly blog post" --limit 10`

These commands should be emitted to workflow logs so if the action is skipped, silent, or fails before writing, the reason is visible in GitHub Actions output.

## Workflow

1. Inspect the oldest open issue tagged `blog`.
2. Read the issue title, body, and any related repo context that helps explain the theme or story behind it.
3. Identify the core narrative arc:
1. Inspect all issues labeled with `blog` and log the current execution context before making any decisions.
2. Capture the selected issue list and confirm which issues are being included in the draft.
3. Read the issue title, body, and any related repo context that helps explain the theme or story behind it.
4. Identify the core narrative arc of each `blog` issue:
- what problem or opportunity is being explored
- why it matters in practical terms
- what changed or what the reader should pay attention to
- what a thoughtful close looks like
4. Draft a markdown blog body in first person with a warm, practical, editorial voice.
5. Make sure the post is grounded in the issue and repo facts only. Do not invent specific details or fabricate events.
6. Save the draft as a new markdown file in `website/blog/` using a date-based slug and a clear title.
7. Create a pull request for review when the draft is ready.
5. Draft a markdown blog body in first person with a warm, practical, editorial voice.
6. Make sure the post is grounded in the issue and repo facts only. Do not invent specific details or fabricate events.
7. Save the draft as a new markdown file in `website/blog/` using a date-based slug and a clear title.
8. Create a pull request for review when the draft is ready.
9. In the PR description, include `Related issues` with one line per included issue, using closing syntax to close them automatically when merged, for example `Closes #94`, `Closes #95`, and `Closes #96`.
10. Include a short executive summary before the issue list so the review PR makes sense even without reading the draft file.

## Writing standards

Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Notes on workflows

## Compile agentic action into lock file

```
cd /Users/geraldinefberry/repos/project-dfberry/repos/dfberry.github.io-2

gh extension install github/gh-aw
gh aw compile --verbose
```

Note: If there’s a mismatch between the generated agentic workflow and the existing YAML files; that mismatch is often the reason scheduled runs silently skip.

## When did the action last run

```
gh run list --workflow "Draft weekly blog post"
```

## Logging

If we want to make debugging easier, the workflow should log:

```
echo "event=${GITHUB_EVENT_NAME}"
echo "ref=${GITHUB_REF}"
gh issue list --label blog --state open
echo "workflow path is on default branch?"
```