Skip to content

Commit

Permalink
Merge pull request #1 from wilderPariona/feature/github-actions
Browse files Browse the repository at this point in the history
πŸ“¦ FEATURE: Add configuration Github Actions
  • Loading branch information
JhonWilderParionaVilca committed Jul 12, 2020
2 parents dd6cedc + 3106681 commit 28da7a5
Show file tree
Hide file tree
Showing 3 changed files with 96 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/development.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Development workflow

on:
push:
branches:
- dev

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- name: πŸ“¦ Checkout code
- uses: actions/checkout@v1

- name: Use Node.js 12.x
uses: actions/setup-node@v1
with:
node-version: 12.x
- name: πŸ— Install and Build
run: |
npm install
npm run build --if-present
- name: πŸš€ Deploy to netlify
uses: netlify/actions/cli@master
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.DEV_NETLIFY_SITE_ID }}
with:
args: deploy --dir=build --prod
secrets: '["NETLIFY_AUTH_TOKEN", "NETLIFY_SITE_ID"]'
32 changes: 32 additions & 0 deletions .github/workflows/production.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Production workflow

on:
push:
tags:
- "v*"

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- name: πŸ“¦ Checkout code
- uses: actions/checkout@v1

- name: Use Node.js 12.x
uses: actions/setup-node@v1
with:
node-version: 12.x
- name: πŸ— Install and Build
run: |
npm install
npm run build --if-present
- name: πŸš€ Deploy to netlify
uses: netlify/actions/cli@master
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.PROD_NETLIFY_SITE_ID }}
with:
args: deploy --dir=build --prod
secrets: '["NETLIFY_AUTH_TOKEN", "NETLIFY_SITE_ID"]'
32 changes: 32 additions & 0 deletions .github/workflows/staging.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Staging workflow

on:
push:
branches:
- master

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- name: πŸ“¦ Checkout code
- uses: actions/checkout@v1

- name: Use Node.js 12.x
uses: actions/setup-node@v1
with:
node-version: 12.x
- name: πŸ— Install and Build
run: |
npm install
npm run build --if-present
- name: πŸš€ Deploy to netlify
uses: netlify/actions/cli@master
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.STAGING_NETLIFY_SITE_ID }}
with:
args: deploy --dir=build --prod
secrets: '["NETLIFY_AUTH_TOKEN", "NETLIFY_SITE_ID"]'

0 comments on commit 28da7a5

Please sign in to comment.