fastify/website

Website preview

Closed this issue · 13 comments

Eomm commented

Right now the workflow https://github.com/fastify/website-next/blob/main/.github/workflows/build_and_deploy.yml deploy to GH Pages the main code

By using a Github action and we should deploy a preview of the website into a temporary Github Pages environment, this would ease the test and feedback

I saw this app that should do the trick: https://github.com/marketplace/actions/deploy-pr-preview but I know it is doable without installing and app (and face security and access assessment). Here an example: npm/statusboard#615

@Eomm I suggest to implement this in a bid to resolve #55 because on local environment, all works fine and images display well but the remote environment deployed has broken images.

The challenge in resolving this is that it is hard to debug since all works well on one environment yet the other it doesnt but a preview would ideally get us to test remotely.

#55 On Local environment
Screenshot from 2023-01-23 15-34-14

#55 on Remote environment
Screenshot from 2023-01-23 15-35-37

Amazing work!

Eomm commented

@HassanBahati, to replicate, you need to change this line in the docusaurus.config.js file:

-const BASE_URL = process.env.BASE_URL ?? '/'
+const BASE_URL = process.env.BASE_URL ?? '/broken'

image

@Eomm i have updated the line in the docusaurus.config.js file and still all seems to work fine on local environment
Screenshot from 2023-01-24 09-36-00

Eomm commented

Coul you try incognito?
If you look at the fastify logo on the upper left corner it is not working tho

yeah sure, let me try that

its same as above, all other images are okay except the logo at top left. let me try to investigate why so

Eomm commented

Reopening because every PR lives on the "production" environment:

image

So every PR is overwriting the main URL at https://fastify.github.io/website-next/

@Eomm since Netlify is where the current website is being hosted, I am suggesting we host this one too there since netlify automatically provides a deploy preview for pull requests.

Eomm commented

I would keep it on GH otherwise netlify will slow down us till get me angry.

Right now it is on netlify but only a few people on the fastify org have access to it and only the paid version provides multiple users/single sign on.

For example, I can't do anything on fastify.io and I should ask to core members to click here and there... not doable or just a pain for what pros?

How about we deploy this to fastify.dev? We should be migrating off from the .io domain anyway. Then things are ok we can add a redirect from fastify.io to fastify.dev.

Eomm commented

It was hard, but I did it.

Now:

image

image

we are deploying there using the standard netifly deploy command.
(we are not using the netlify app on GH, it does not work with our custom setup)

finally we can close this issue

finally we can close this issue

wow 👏 well done @Eomm...always inspired by you