Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create deployment github action workflow #2

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading