Support Forums

Build netlify in github actions

I am trying build code with netlify in github actions,

but i am not able to do it.

My repo : GitHub - alisalim17/airbnb-clone: Airbnb clone built with typescript,graphql,react and prisma

My netlify toml file :


command = “npm run build:web”
publish = “packages/web/out”

directory = “packages/web/out_functions”

command = “yarn start”
port = 8888
targetPort = 4321
publish = “packages/web/out”
functions = “packages/web/out_functions”
autoLaunch = true
framework = “next”

package = “@netlify/plugin-nextjs”

I am trying use jsmrcaga/action-netlify-deploy@master

But it gives me the following error :



126> netlify build


129(node:425) [EACCES] Error Plugin: netlify-cli: EACCES: permission denied, open ‘/github/home/.config/netlify/config.json’

130You don’t have access to this file.


132module: @oclif/config@1.17.0

133task: runHook init

134plugin: netlify-cli

135root: /github/workspace/node_modules/netlify-cli

136See more details with DEBUG=*

137(Use node --trace-warnings ... to show where the warning was created)

138 Error Plugin: netlify-cli: EACCES: permission denied, open

139 ‘/github/home/.config/netlify/config.json’

140 You don’t have access to this file.


142 Code: EACCES

143[Error: EACCES: permission denied, mkdir ‘/github/home/.cache/netlify-cli’] {

144 errno: -13,

145 code: ‘EACCES’,

146 syscall: ‘mkdir’,

147 path: ‘/github/home/.cache/netlify-cli’


148Deploy path: /github/workspace/packages/web/out

149Functions path: /github/workspace/packages/web/out_functions

150Configuration path: /github/workspace/netlify.toml

151 › Error: No such directory /github/workspace/packages/web/out! Did you

152 › forget to run a build?

The Github actions workflow => fix build · alisalim17/airbnb-clone@54381ac · GitHub

Hi @alisalimli,

You don’t need to use a third-party action and we can’t provide support for it. Netlify has its own CLI (Netlify CLI) that you can install as a dependency in your project and deploy using it.

Yeah,i know

but i want to deploy to preview when somebody contribute to my project for seeing everything ok or not.

Hi @alisalimli,

You can’t trigger a deploy preview (at least not officially) using a GitHub Action. Netlify will auto-build deploy previews when a commit is pushed as a PR and not otherwise.

actually i am able to do it,but i can’t build code using this third part action

I solve the issue with different approach.

My yaml file :