Skip to content

Commit

Permalink
create deployment github action workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
wendelfabianchinsamy committed Oct 8, 2023
1 parent 3e06ff7 commit 9a02f28
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 1 deletion.
36 changes: 36 additions & 0 deletions .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# here we define a workflow with two jobs
# the two jobs will run in parallel
# this may not be ideal
# typically you would want your tests to pass before
# deploying the code
name: Deploy Project
on: push
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Get code from repository
uses: actions/[email protected]
- name: Install NodeJS
uses: actions/[email protected]
with:
node-version: 18
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm test
deploy:
runs-on: ubuntu-latest
steps:
- name: Get code from repository
uses: actions/[email protected]
- name: Install NodeJS
uses: actions/[email protected]
with:
node-version: 18
- name: Install dependencies
run: npm ci
- name: Build project
run: npm run build
- name: Deploy
run: echo "Deploying to AWS"
3 changes: 2 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Test Project
# run this each time a new push happens to our repository
on: push
# on: push
on: workflow_dispatch
jobs:
test:
runs-on: ubuntu-latest
Expand Down

0 comments on commit 9a02f28

Please sign in to comment.