netlify/actions

Deployments are "locked" for production context of this site

Closed this issue Β· 2 comments

Hello, I would like to use these actions to deploy my website to Netlify, but the script requires user interaction.

Snímek obrazovky 2020-12-08 v 15 06 39

This is my configuration file:

name: ci

on:
  push:
    branches:
      - main
      - master
  pull_request:
    branches:
      - main
      - master

jobs:
  ci:
    runs-on: ${{ matrix.os }}

    strategy:
      matrix:
        os: [ubuntu-latest]
        node: [14]

    steps:
      - name: Checkout πŸ›Ž
        uses: actions/checkout@master

      - name: Setup node env πŸ—
        uses: actions/setup-node@v2.1.2
        with:
          node-version: ${{ matrix.node }}

      - name: Cache node_modules πŸ“¦
        uses: actions/cache@v2
        with:
          path: ~/.npm
          key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
          restore-keys: |
            ${{ runner.os }}-node-

      - name: Install dependencies πŸ‘¨πŸ»β€πŸ’»
        run: npm ci

      - name: Run linter πŸ‘€
        run: npm run lint

      - name: Build application πŸ› 
        run: npm run generate

      - name: Deploy to Netlify πŸš€
        uses: netlify/actions/cli@master
        env:
          NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
          NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
        with:
          args: deploy --dir=dist --prod

The job does not fail, but no deployment happens.

Should I configure something?
I event tried to enable automatic deployments on every push in Netlify, but even with that option it won't work.

Thank you!

I had automatic builds disabled as I thought that it will still works from CLI. I enabled automatic builds again, but point to a branch I won't be pushing to every time.

Netlify is more and more disappointing. Why we need such work around?