postiz-app icon indicating copy to clipboard operation
postiz-app copied to clipboard

add build gh-action

Open jonathan-irvin opened this issue 1 year ago • 7 comments

  • What kind of change does this PR introduce? (Bug fix, feature, docs update, ...) GH Build Action

  • Why was this change needed? (You can also link to an open issue here) To highlight any dep issues on a barebones environment

  • Other information:

jonathan-irvin avatar Sep 07 '24 18:09 jonathan-irvin

@jonathan-irvin is attempting to deploy a commit to the Listinai Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] avatar Sep 07 '24 18:09 vercel[bot]

@nevo-david you can see here, how it should work, but for a simple build... it's failing. Can you provide some guidance on what's missing?

https://github.com/jonathan-irvin/postiz-app/actions/runs/10753618659/job/29823249318

jonathan-irvin avatar Sep 07 '24 18:09 jonathan-irvin

Hey @jonathan-irvin , as discussed in #206, you asked me to see if I could take a look and get this working. It didn't require any changes of npm to pnpm or anything, but I think the problem is possibly in your setup the prisma models were not being generated? I see you used the default Node GitHub action without changes, that misses a couple of steps.

Working GitHub run: https://github.com/jamesread/postiz-app/actions/runs/10753943537 . Working GitHub Actions file: https://github.com/jamesread/postiz-app/blob/main/.github/workflows/node.js.yml

More than happy for you to take these and adjust your own PR?

jamesread avatar Sep 07 '24 19:09 jamesread

I need to correct myself;

but I think the problem is possibly in your setup the prisma models were not being generated? I see you used the default Node GitHub action without changes, that misses a couple of steps.

I see that actually these were in your action later on, so actually I'm not sure why your build specifically failed! Difficult to diagnose the difference because there are lots of changes.

Suggest that maybe it's not strictly necessary to use pnpm and similar, though? It's probably a good thing if this app supports multiple different environments and configurations, but the GitHub action I posted at least tests against a known good configuration.

jamesread avatar Sep 07 '24 21:09 jamesread

@nevo-david you can see here, how it should work, but for a simple build... it's failing. Can you provide some guidance on what's missing?

https://github.com/jonathan-irvin/postiz-app/actions/runs/10753618659/job/29823249318

Looks like it's trying to load some remote font and failing, possibly no access to the internet during build? CleanShot 2024-09-08 at 11 18 40

nevo-david avatar Sep 08 '24 04:09 nevo-david

Ah, I did have this myself now you bring it up. I remember I just re-ran the build and it worked.

Maybe we could store the fonts locally, to avoid this and make loading the fonts much faster?

jamesread avatar Sep 08 '24 09:09 jamesread

@nevo-david we need to add the font as a dependency

jonathan-irvin avatar Sep 09 '24 04:09 jonathan-irvin

@jamesread and @nevo-david We have a working build. It's not producing artifacts yet, but it's a sanity check nonetheless.

https://github.com/jonathan-irvin/postiz-app/actions/runs/10775046599

jonathan-irvin avatar Sep 09 '24 14:09 jonathan-irvin