Remove the original sample workflow file #2
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
name: Node.js CI | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v2 | |
- name: Install Dependencies | |
run: npm install | |
- name: Run Test Suite | |
run: npm test | |
start-server: | |
runs-on: ubuntu-latest | |
needs: test | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v2 | |
- name: Install Dependencies | |
run: npm install | |
- name: Start Server | |
run: node app.js & | |
- name: Conditional Step | |
run: echo "This step only runs on the main branch" | |
if: github.ref == 'refs/heads/main' |