Stenope icon indicating copy to clipboard operation
Stenope copied to clipboard

Document how to publish to github pages (github.io)

Open tacman opened this issue 1 year ago • 4 comments

This is very cool! Thanks for releasing it.

Can you provide some guidance or scripts to show how to publish the /static directory to github pages? That is, I'd love to be able to have my 'my-demo' repo with the symfony code show the static site at my-demo.github.io.

I'm working through the github instructions, but I'm pretty sure there's a better way than what I'm doing.

Thanks.

tacman avatar Oct 04 '23 12:10 tacman

So I was able to get my static files from https://github.com/tacman/micro-calendar working on github pages! https://tacman.github.io/micro-calendar/

The trick is to build to ./docs and make the repo name the base-url.

bin/console asset-map:compile
bin/console -e prod cache:clear
bin/console -e prod stenope:build ./docs --base-url /micro-calendar/
rm public/assets/ -rf 
git add docs
git commit -m "build static pages"
git push

In /settings/pages, point the source to /docs

image

tacman avatar Oct 04 '23 17:10 tacman

You could also commit to a dedicated gh-pages branch.

Did you already consult https://stenopephp.github.io/skeleton/articles/deployment/ ? We provide an example of a GitHub workflow in the skeleton for doing this.

ogizanagi avatar Oct 09 '23 12:10 ogizanagi

I hadn't seen that at all! Can you add that to the README somewhere? And a link to the various articles?

tacman avatar Oct 09 '23 13:10 tacman

The skeleton project is referenced in the installation section for now : https://stenopephp.github.io/Stenope/#installation

image

But I agree we need to rework the documentation.

ogizanagi avatar Oct 09 '23 15:10 ogizanagi