nwtgck / actions-netlify

🚀 Netlify deploy from GitHub Actions
MIT License
332 stars 41 forks source link

Does this action allow for builds? #400

Open petehanssens opened 3 years ago

petehanssens commented 3 years ago

I've got the following github actions setup:

name: Build and Deploy to Netlify
on:
  push:
  pull_request:
    types: [opened, synchronize]
jobs:
  build:
    runs-on: ubuntu-18.04
    defaults:
      run:
        working-directory: frontend
    steps:
      - uses: actions/checkout@v2
      - run: npm --version && node --version
      - run: npm i
      - run: npm run build
      - run: npm install -D netlify-cli
      - run: npx netlify-cli status
        env:
          NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
          NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
      - run: npx netlify-cli build
        env:
          NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
          NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
      - name: Deploy to Netlify
        uses: nwtgck/actions-netlify@v1.1
        with:
          publish-dir: './out_publish'
          functions-dir: './out_functions'
          production-branch: master
          # github-token: ${{ secrets.GITHUB_TOKEN }}
          deploy-message: "Deploy from GitHub Actions"
          enable-pull-request-comment: false
          enable-commit-comment: true
          overwrites-pull-request-comment: true
        env:
          NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
          NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
        timeout-minutes: 1

It it possible to instead somehow use the action to do the build... this setup that I have doesn't work btw due to some weird stuff going on with the netlify-cli which is really annoying!

nwtgck commented 3 years ago

Could you use new lines using the following syntax?

```yaml
write here