Skip to content

Commit dadccd6

Browse files
Create post: post/make-new-post-via-github-pull-request
1 parent 3943539 commit dadccd6

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

drafts/make-new-post-via-github-pull-request

Whitespace-only changes.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
title: Create New Posts by Making Pull Requests
3+
layout: post
4+
comments: false
5+
tags: about this site
6+
---
7+
8+
This is a little easier than I thought it would be. So basically it generates a post from a pull request's body and commits it to branch. I already have an action that reruns the site generator whenever something new appears in directory, so in effect I just need to write whatever I want to write in the PR's body, and press when I'm happy with it.
9+
10+
More specifically there are 4 GitHub actions in action (no pun intended):
11+
12+
1. Creates a PR by running an action: I want to be able to do it very easily, with this I only need to type in the title of the post and a new PR will be populated. Note that in order to make a new PR, I need to insert something into the new commit. That something is a file named .
13+
2. Generates the new post file in directory: when I'm good with the PR body and merge the PR, an action will pipe the body into the new file. The draft iteme will also be removed.
14+
3. Run the Haskell site generator. The action detects if anything's changed in , and if so generates the static site. The generator itself doesn't change much, the action nicely takes care of caching it so that it doesn't spend twenty minutes compiling hakyll.
15+
4. Deploy to GH pages. I didn't write this myself.
16+

0 commit comments

Comments
 (0)