Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does this action allow for builds? #400

Open
petehanssens opened this issue Jan 6, 2021 · 1 comment
Open

Does this action allow for builds? #400

petehanssens opened this issue Jan 6, 2021 · 1 comment

Comments

@petehanssens
Copy link

petehanssens commented Jan 6, 2021

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/[email protected]
        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
Copy link
Owner

nwtgck commented Jan 8, 2021

Could you use new lines using the following syntax?

```yaml
write here
```

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants