ericwang07 is testing out GitHub Actions #185
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: GitHub Actions Demo | |
run-name: ${{ github.actor }} is testing out GitHub Actions | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
Explore-GitHub-Actions: | |
runs-on: ubuntu-latest | |
env: | |
MONGO_URL: ${{ secrets.MONGO_URL }} # Repo secret | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Install dependencies | |
run: npm i | |
working-directory: server | |
- name: Build app | |
run: npm run build --if-present | |
working-directory: server | |
- name: Start Server | |
run: npm start & | |
working-directory: server | |
- name: Run tests | |
run: npm test | |
working-directory: server |