Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
tacman opened this issue Oct 4, 2023 · 4 comments
Open

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

tacman opened this issue Oct 4, 2023 · 4 comments

Comments

@tacman
Copy link

tacman commented Oct 4, 2023

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
Copy link
Author

tacman commented Oct 4, 2023

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

@ogizanagi
Copy link
Member

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.

@tacman
Copy link
Author

tacman commented Oct 9, 2023

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

@ogizanagi
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants