withastro / action

A GitHub Action that deploys your Astro project to GitHub Pages
Other
143 stars 31 forks source link

Monorepo support #32

Open jpwallace22 opened 7 months ago

jpwallace22 commented 7 months ago

Maybe I am doing something wrong, but I cannot for the life of me deploy from a yarn workspaces monorepo.

I added the base:

// astro.config.msj
{
 base: '/docs',
}

Screenshot 2023-12-09 at 9 35 13 AM

It won't build properly because it won't build my other dependencies.

So if I remove the base, it fails because it can't find the docs/dist directory.

I need a way to build from the root and deploy from a path, but it doesn't seem as though one is exposed.

nemanjam commented 6 months ago

I have same problem with turborepo. Why this action doesn't have additional arguments for this?

natemoo-re commented 6 months ago

Earlier versions of this action included many options to configure all of the inputs and outputs, but we ended up with many confusing, conflicting configuration options.

If anyone has ideas about options we could add to better support monorepos, please let us know!


Custom build pipelines with more complex requirements can always accomplish the same thing as this action by adding an additional step after the build runs:

    - name: Upload Pages Artifact
      uses: actions/upload-pages-artifact@v3
      with:
        path: "./packages/www/dist/"
nemanjam commented 6 months ago

I built it manually and uploaded it in the end.

https://github.com/nemanjam/nemanjam.github.io/blob/main/.github/workflows/deploy-gh-pages.yml

natemoo-re commented 4 months ago

Awesome! That is probably the best course of action for now.