···55 name: Build
66 runs-on: ubuntu-latest
77 steps:
88- - name: Set up Go 1.12
88+ - name: Set up Go 1.14
99 uses: actions/setup-go@v1
1010 with:
1111- go-version: 1.12
1111+ go-version: 1.14
1212 id: go
1313 - name: Check out code into the Go module directory
1414 uses: actions/checkout@v1
+1-1
Dockerfile
···11-FROM xena/go:1.13.6 AS build
11+FROM xena/go:1.14 AS build
22ENV GOPROXY https://cache.greedo.xeserv.us
33COPY . /site
44WORKDIR /site
+52
blog/patron-page-2020-02-29.markdown
···11+---
22+title: "New Site Feature: Patron Thanks Page"
33+date: 2020-02-29
44+---
55+66+# New Site Feature: Patron Thanks Page
77+88+I've added a [patron thanks page](/patrons) to my site. I've been getting a
99+significant amount of money per month from my patrons and I feel this is a good
1010+way to acknowledge them and thank them for their patronage. I wanted to have it
1111+be _as simple as possible_, so I made it fetch a list of dollar amounts.
1212+1313+Here are some things I learned while writing this:
1414+1515+- If you are going to interact with the patreon API in go, use
1616+ [`github.com/mxpv/patreon-go`][patreongo], not `gopkg.in/mxpv/patreon-go.v1`
1717+ or `gopkg.in/mxpv/patreon-go.v2`. The packages on gopkg.in are NOT compatible
1818+ with Go modules in very bizarre ways.
1919+- When using refresh tokens in OAuth2, do not set the expiry date to be
2020+ _negative_ like the patreon-go examples show. This will brick your token and
2121+ make you have to reprovision it.
2222+- Patreon clients can either be for API version 1 or API version 2. There is no
2323+ way to have a Patreon token that works for both API versions.
2424+- The patreon-go package only supports API version 1 and doesn't document this
2525+ anywhere.
2626+- Patreon's error messages are vague and not helpful when trying to figure out
2727+ that you broke your token with a negative expiry date.
2828+- I may need to set the Patreon information every month for the rest of the time
2929+ I maintain this site code. This could get odd. I made a guide for myself in
3030+ the [docs folder of the site repo][docsfolder].
3131+- The Patreon API doesn't let you submit new posts. I wanted to add Patreon to
3232+ my syndication server, but apparently that's impossible. My [RSS
3333+ feed](/blog.rss), [Atom feed](/blog.atom) and [JSON feed](/blog.json) should
3434+ let you keep up to date in the meantime.
3535+3636+Let me know how you like this. I went back and forth on displaying monetary
3737+amounts on that page, but ultimately decided not to show them there for
3838+confidentiality reasons. If this is a bad idea, please let me know and I can put
3939+the money amounts back.
4040+4141+I'm working on a more detailed post about [pa'i][pahi] that includes benchmarks
4242+for some artificial and realistic workloads. I'm also working on integrating it
4343+into the [wamscloud][wasmcloud] prototype, but it's fairly slow going at the
4444+moment.
4545+4646+Be well.
4747+4848+[patreongo]: https://github.com/mxpv/patreon-go
4949+[docsfolder]: https://github.com/Xe/site/tree/master/docs
5050+[pahi]: https://github.com/Xe/pahi
5151+[wasmcloud]: https://tulpa.dev/within/wasmcloud
5252+
···11+#+TITLE: Patron Page
22+33+#+BEGIN: clocktable :maxlevel 2 :emphasize nil :scope file
44+#+CAPTION: Clock summary at [2020-02-29 Sat 20:47]
55+| Headline | Time | |
66+|------------------------------------------+--------+------|
77+| *Total time* | *1:36* | |
88+|------------------------------------------+--------+------|
99+| figure out how to get list of patrons | 1:05 | |
1010+| \_ get patreon credentials into site | | 0:08 |
1111+| \_ figure out patreon id of my campaign | | 0:25 |
1212+| \_ get list of patrons | | 0:25 |
1313+| \_ show in HTML | | 0:07 |
1414+| figure out how to handle the secrets... | 0:03 | |
1515+| Links | 0:28 | |
1616+| \_ Announcement blogpost | | 0:28 |
1717+#+END: clocktable
1818+1919+* DONE figure out how to get list of patrons
2020+ CLOSED: [2020-02-29 Sat 20:18]
2121+** DONE get patreon credentials into site
2222+ CLOSED: [2020-02-29 Sat 19:14]
2323+ :LOGBOOK:
2424+ CLOCK: [2020-02-29 Sat 19:06]--[2020-02-29 Sat 19:14] => 0:08
2525+ :END:
2626+2727+Added envvars
2828+2929++ =PATREON_CLIENT_ID=
3030++ =PATREON_CLIENT_SECRET=
3131++ =PATREON_ACCESS_TOKEN=
3232++ =PATREON_REFRESH_TOKEN=
3333+** DONE figure out patreon id of my campaign
3434+ CLOSED: [2020-02-29 Sat 19:39]
3535+ :LOGBOOK:
3636+ CLOCK: [2020-02-29 Sat 19:14]--[2020-02-29 Sat 19:39] => 0:25
3737+ :END:
3838+** DONE get list of patrons
3939+ CLOSED: [2020-02-29 Sat 20:05]
4040+ :LOGBOOK:
4141+ CLOCK: [2020-02-29 Sat 19:40]--[2020-02-29 Sat 20:05] => 0:25
4242+ :END:
4343+** DONE show in HTML
4444+ CLOSED: [2020-02-29 Sat 20:12]
4545+ :LOGBOOK:
4646+ CLOCK: [2020-02-29 Sat 20:05]--[2020-02-29 Sat 20:12] => 0:07
4747+ :END:
4848+* DONE figure out how to handle the secrets for patreon
4949+ CLOSED: [2020-02-29 Sat 20:18]
5050+ :LOGBOOK:
5151+ CLOCK: [2020-02-29 Sat 20:15]--[2020-02-29 Sat 20:18] => 0:03
5252+ :END:
5353+Currently putting them in the dyson secret store, will need to figure out
5454+something else for dhall.
5555+* DONE Links
5656+ CLOSED: [2020-02-29 Sat 20:47]
5757+** DONE Add link in footer
5858+ CLOSED: [2020-02-29 Sat 20:13]
5959+** DONE Add into sitemap
6060+ CLOSED: [2020-02-29 Sat 20:13]
6161+** DONE Announcement blogpost
6262+ CLOSED: [2020-02-29 Sat 20:47]
6363+ :LOGBOOK:
6464+ CLOCK: [2020-02-29 Sat 20:37]--[2020-02-29 Sat 20:47] => 0:10
6565+ CLOCK: [2020-02-29 Sat 20:19]--[2020-02-29 Sat 20:37] => 0:18
6666+ :END:
6767+6868+* How to refresh credentials
6969+7070+1. Go to https://www.patreon.com/portal/registration/register-clients
7171+2. Open Mi (API v1)
7272+3. Hit "Refresh Token"
7373+4. Copy access token and refresh token to
7474+ ~/code/within-terraform-secret/christinewebsite.env as =PATREON_ACCESS_TOKEN=
7575+ and =PATREON_REFRESH_TOKEN=
7676+5. Commit file to repo and push
7777+6. Retry deployment of the site
···6868 <footer>
6969 <blockquote>Copyright 2020 Christine Dodrill. Any and all opinions listed here are my own and not representative of my employers; future, past and present.</blockquote>
7070 <br />
7171- <p>Like what you see? Donate on <a href="https://www.patreon.com/cadey">Patreon</a>!</p>
7171+ <p>Like what you see? Donate on <a href="https://www.patreon.com/cadey">Patreon</a> like <a href="/patrons">these awesome people</a>!</p>
7272 </footer>
73737474 <script>
+20
templates/patrons.html
···11+{{ define "title" }}
22+<title>Patrons - Christine Dodrill</title>
33+{{ end }}
44+55+{{ define "content" }}
66+<h1>Patrons</h1>
77+88+<p>These awesome people donate to me on <a href="https://patreon.com/cadey">Patreon</a>. If you would like to show up in this list, please donate to me on Patreon. This is refreshed every time the site is deployed.</p>
99+1010+<p>
1111+ <ul>
1212+ {{- range . }}
1313+ <li>{{ . }}</li>
1414+ {{- end }}
1515+ </ul>
1616+</p>
1717+1818+<p>Thank you so much! Your support helps make my projects possible.</p>
1919+2020+{{ end }}