kip
July 2, 2023, 11:21pm
1
I’m heading down the path of using nimble_publisher to publish to Github Pages using github’s deploy-action to generate and upload artifacts.
Anyone walked this path before and has any suggestions, scripts or experience to share?
I’m heading this way for simplicity - simple design, static site, hosting along side the code repo.
5 Likes
I was googling on how other things work with gh-pages.
Here are a few things I understand.
build step and upload to ./dist
folder in the repo
ant-design/docs/blog/github-actions-workflow.en-US.md at a355f0947292c542f7c4f993d0bec821b8bfa0a4 · afc163/ant-design · GitHub
then use ant-design/docs/blog/github-actions-workflow.en-US.md at a355f0947292c542f7c4f993d0bec821b8bfa0a4 · afc163/ant-design · GitHub to publish to github pages.
I believe steps should be similar. Haven’t tried this one though. Maybe during upcoming week, I will!
1 Like
I would like to break the task in two parts:
Generate a static website: Fly.io has an article related to this topic - Crafting your own Static Site Generator using Phoenix · Fly , it introduces how to generate a static site using nimble_publisher.
Then, deploy the static website to GitHub Pages. There’re a bunch of articles related to this, such as:
Although these articles are for Hugo, but they works for any static sites.
2 Likes
I came here to post exactly this, having evaluated this stack recently. Found the same resources and whipped together a prototype very quickly before deciding on another course, but it works great!
1 Like
zorn
July 4, 2023, 4:14pm
5
I used GitHub Actions to publish the docs of my Elixir project to GitHub Pages (using the current beta deployment target instead of a separate repo). You can check out the action here:
name: Elixir Publish Documentation
on:
push:
branches: ["main"]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
This file has been truncated. show original
https://zorn.github.io/franklin/Franklin.html
Good luck.
8 Likes
kip
July 4, 2023, 7:57pm
6
Thanks all very much for the suggestions. And a special shoutout to @zorn , I’ll be giving the recipes a workout on a long flight later this week.
1 Like