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

Is there any way to deploy the radar as static on GCS ? #419

Open
M3lkior opened this issue Jan 26, 2024 · 4 comments
Open

Is there any way to deploy the radar as static on GCS ? #419

M3lkior opened this issue Jan 26, 2024 · 4 comments

Comments

@M3lkior
Copy link

M3lkior commented Jan 26, 2024

Hi !

First, congratulations for the work you do on this repo, it is very impressing !

I currently work on a static hosting website where i want to integrate your radar technology. This website is hosted thanks to a GCS public bucket and i want to do the same with your radar because i see in the documentation that this is possible to generate the radar statically for a S3 usage for example.
So because S3 and GCS are very similar, i assumed that your static generation can work on GCS but it appears that this is not the case.

I build the files with PUBLIC_URL='https://storage.googleapis.com/zatsit-test-ssr' npm run start:static from your techradar repo

The public URL is here : https://storage.googleapis.com/zatsit-test-ssr/index.html

Same result with a GhPages hosting:

Can you help me for this need ?
Any idea about how to do this works ?

Edit: i succeed to deploy the site to github.io by changing the router with a HashRouter (BrowserRouter is not supported by github pages)

Thanks a lot

@mathiasschopmans
Copy link
Contributor

Hi @M3lkior,
I would also have recommended using the HashRouter for GCS and GitHub-Pages.

Since you have already successfully deployed it to GitHub pages, I will close this ticket. Feel free to open it again if in doubt. ☺️

@andyn-ff
Copy link

Hi @M3lkior / @mathiasschopmans, I am also facing a problem trying to deploy to GitHub Pages. Can you share any more info on how you solved this issue, are you able to share the source you used to generate the static content?

Do I need to fork aoe_technology_radar to use HashRouter instead of BrowserRouter? I haven't been able to figure this out myself because I couldn't find any occurence of BrowserRouter in the existing code.

Thanks, I really appreciate your help getting started.

@mathiasschopmans
Copy link
Contributor

Hi @andyn-ff,

Thanks for reaching out! Since this issue was first raised, the Tech Radar has been refactored to Next.js. This means that neither HashRouter nor BrowserRouter is required anymore for hosting on GitHub Pages.

To assist further, I'll reopen the issue and work on providing an example over the holidays. Thanks for your patience!

Best regards,
Mathias

@andrablaj
Copy link

Hi @andyn-ff!

In the CHT community, we built a Tech Radar based on AOE's fantastic work with this repo (thank you AOE; you are awesome ❤️).

We use the 4.4.0 release based on Next.js.

I am sharing the GitHub Action we implemented to deploy the radar content to GH Pages, in case it can help someone.

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout 🛎️
        uses: actions/checkout@v4

      - name: Setup Node.js ⚙️ - Cache dependencies ⚡ - Install dependencies 🔧
        uses: ./.github/workflows/setup-node

      - name: Setup Pages ⚙️
        id: pages
        uses: actions/configure-pages@v4
        if: ${{ github.ref == 'refs/heads/main' }}
        with:
          static_site_generator: next

      - name: Build with Next.js 🏗️
        run: npm run build

      - name: Upload artifact 📡
        uses: actions/upload-pages-artifact@v3
        with:
          path: ./build

  deploy:
    environment:
      name: github-pages
      url: ${{ steps.deployment.outputs.page_url }}

    runs-on: ubuntu-latest
    needs: build

    steps:
      - name: Publish to GitHub Pages 🚀
        id: deployment
        uses: actions/deploy-pages@v4

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

4 participants