-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
π¦ FEATURE: Add configuration Github Actions
- Loading branch information
1 parent
dd6cedc
commit 3106681
Showing
3 changed files
with
96 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"]' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"]' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"]' |