Closed ianmuchina closed 3 years ago
@IanMuchina for simplicity’s sake, "Option 2" seems viable to me.
@jasonrogena @IanMuchina Possibly ok without previews. One can update the site as needed if some errors are found. Actions are well documented: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/introduction-to-github-actions Possible steps to put in an action (not tested, but may help get started) is in #190
@bkmgit this should work.
name: Update Website
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true # Gets all submodules
fetch-depth: 0 # get entire history
- name: Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: pip install -r requirements.txt
- name: Generate site
run: make html
- name: push output to gh-pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./output
The output looks like this
@IanMuchina Thanks. Current request #190 should work, requirements do not always seem to install cleanly. Also uses fewer dependencies.
@IanMuchina Sorry did not realise you had something working 17 days ago! Would have suggested just using that.
@jasonrogena @bkmgit
Some alternatives to Netlify: https://vercel.com/ https://blog.cloudflare.com/cloudflare-pages/
It might be nice to transition to a different static site generator with fewer dependencies: https://jamstack.org/generators/ Maybe something written in Go, Ruby, Rust or C++
Cloudflare pages is a really good option
I agree with @jasonrogena that GitHub pages is the best option. The idea behind using GitHub originally was that the site's code is managed in git so that anyone in the world who wants to contribute can—in the true social code model. As for updating the website, that should be automated, but trigger-able by a few people in the LUG with permissions.
Managing everything in GitHub makes it easier to keep most of our user/group/permissions management in one place. We don't have to maintain accounts on third-party service providers and try to share the passwords. Let's not over-engineer this. The one exception to this is that @rwanyoike and I have access to the CloudFlare account that manages DNS for nairobilug.or.ke.
I don't think we need deploy previews. It's cool of course, but our website changes just about once a month and it's not critical infrastructure. For what it's worth, when I was more active in the LUG I would attach a screenshot to my pull requests.
Right now, (I think) the maintainers do this each time there is a PR/change to be made
Merge PR -> 👨💻 Pull repo -> generate site -> 🥱 push to gh-pages -> site deployed
I propose we use some sort of automation so the work-flow looks like this.
Merge PR -> 🤖 Automation 🤖 -> site deployed
Option 1. Netlify
The services focus on making static site hosting easier.
Advantages
Disadvantages
Demo
Example PR with preview url
Other providers
vercel - Mostly same features & restricions
render - Mostly same + Free for teams
DigitalOcean App platform - Free, previews yet to be implemented , unlimited collaborators
Option 2. github-pages + github actions
Github actions can be used to automate almost anything.
Advantages
Free & part of github
quickest setup
Lots of community-created actions like this
Disadvantages
No deploy previews
Demo
Example site
actions.yml
fotr the siteIf we end up using github actions, we can still use netlify just for checks & deploy previews.