Merge pull request #20 from wunlei/develop #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: Deploy to Netlify on push to main | |
on: | |
# Triggers the workflow on push request events but only for the main branch | |
push: | |
branches: [ main ] | |
# Allows to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Dependencies | |
run: npm install | |
- name: Run Tests | |
run: npm run test | |
- name: Build | |
run: npm run build | |
- name: Deploy | |
env: | |
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} | |
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | |
run: netlify deploy --dir=build --prod | |