Env Setup #1
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: CI/CD Pipeline | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v2 | |
- name: Set up Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 14 | |
- name: Install Dependencies | |
run: npm install | |
- name: Build ForSure Code | |
run: npm run build | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v2 | |
- name: Set up Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 14 | |
- name: Install Dependencies | |
run: npm install | |
- name: Run Tests | |
run: npm run test | |
deploy: | |
needs: [build, test] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v2 | |
- name: Set up Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 14 | |
- name: Install Dependencies | |
run: npm install | |
# TODO: Add deployment steps specific to Parcel | |
# - name: Install Parcel CLI | |
# run: npm install -g parcel-bundler | |
# - name: Build and Deploy with Parcel | |
# run: parcel build index.html --public-url ./ | |
# - name: Upload Artifacts to Hosting Platform | |
# # Add the necessary actions to upload your build artifacts to the hosting platform of your choice |