GithubHelp home page GithubHelp logo

Support for edge-functions about actions-netlify HOT 6 OPEN

nwtgck avatar nwtgck commented on May 30, 2024
Support for edge-functions

from actions-netlify.

Comments (6)

das-monki avatar das-monki commented on May 30, 2024 1

No luck with this action, but haven't tried much. In the end I moved away from using this action and instead use the netlify-cli directly. Worked on first try, and I can use the same command locally.

The step I use to deploy:

    - name: Deploy to Netlify
      env:
        NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
        NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID_CHECKOUT }}
      run: "npm install -g netlify-cli && npx netlify deploy --prod --message \"${{ github.event.head_commit.message }}\""

from actions-netlify.

joepavitt avatar joepavitt commented on May 30, 2024

Just checking to see if you'd had any luck with this? I've pointed to my edge_functions in the netlify.toml (and the pointed the action to this), but no luck getting Netlify to pick them up.

If I use Netlify's built in GH integration, they work great, but we have some GH voodoo to do first (merging content from a couple of repos) before we deploy our website fully, so need to deploy via GH Actions.

from actions-netlify.

joepavitt avatar joepavitt commented on May 30, 2024

Thanks, I ended up going for a different approach of using GitHub actions to handle the repo merging we needed to do, then committing/pushing that to a dedicated live branch and then use Netlify's native GH integration to pull

from actions-netlify.

das-monki avatar das-monki commented on May 30, 2024

Cool you found a way! For reference, this is the complete workflow that I use. This is part of a mono-repo, so I switch the directory in the start to the one I want to deploy. Just including it to promote nix.. 🤓

name: "Build & Deploy App to Netlify"
on:
  pull_request:
  push:
    branches:
      - main
jobs:
  build-and-deploy:
    runs-on: ubuntu-latest
    defaults:
      run:
        working-directory: ./app
    if: "contains(github.event.head_commit.message, '[release app]') || contains(github.event.head_commit.message, '[release all]')"
    steps:
    - name: Checking out the repository
      uses: actions/checkout@v3
      with:
        fetch-depth: 0
    - name: Installing Nix
      uses: cachix/install-nix-action@v18
      with:
        nix_path: nixpkgs=channel:nixos-unstable
    - name: Build the app
      uses: workflow/[email protected]
      with:
        packages: jdk11,nodePackages.npm,nodejs
        script: |
          npm ci
          npm run release -w app
    - name: Deploy to Netlify
      env:
        NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
        NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID_CHECKOUT }}
      run: "npm install -g netlify-cli && npx netlify deploy --prod --message \"${{ github.event.head_commit.message }}\""

from actions-netlify.

nwtgck avatar nwtgck commented on May 30, 2024

https://github.com/netlify/actions/tree/master/cli uses netlify-cli inside. It is netlify official.

from actions-netlify.

joepavitt avatar joepavitt commented on May 30, 2024

It is netlify official.

I had tried it, but just kept hitting limitations of what I needed, and errors, e.g. can't run the build command on a nested directory using that Action.

from actions-netlify.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.