Skip to content
This repository has been archived by the owner on Jul 8, 2023. It is now read-only.

Commit

Permalink
Feat: Use Netlify official action
Browse files Browse the repository at this point in the history
  • Loading branch information
luisorbaiceta committed Jan 18, 2022
1 parent 3da47bc commit 0749438
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
branches: [main]
pull_request:
branches: ['*']
branches: ["*"]

jobs:
build:
Expand All @@ -20,7 +20,7 @@ jobs:
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
cache: "npm"

- name: Install Dependencies
run: npm ci
Expand All @@ -30,10 +30,8 @@ jobs:

# Sets the branch name as environment variable
- uses: nelonoel/branch-name@v1.0.1
- uses: jsmrcaga/action-netlify-deploy@master
with:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
- name: Publish
uses: netlify/actions/build@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
# TODO check if head is passed correctly
NETLIFY_DEPLOY_TO_PROD: ${{ env.BRANCH_NAME == env.GITHUB_HEAD_REF }}
deploy_alias: ${{ env.BRANCH_NAME }}

0 comments on commit 0749438

Please sign in to comment.