Skip to content

Update cd.yml

Update cd.yml #41

Workflow file for this run

name: CI/CD Pipeline
on:
push:
branches: ["feature/*","develop","main","hotfix/*"]
pull_request:
branches: ["feature/*","develop","main","hotfix/*"]
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 16
- name: Install dependencies
run: |
cd D:\a\smart-charger-web\smart-charger-web\Software\smart-charger
npm install
- name: Build
run: |
cd D:\a\smart-charger-web\smart-charger-web\Software\smart-charger
npm run build
#- name: Test
# run: |
# cd D:\a\smart-charger-web\smart-charger-web\Software\smart-charger
# npm run test
deploy:
name: Deploy
needs: build
runs-on: windows-latest
steps:
#- name: Download artifact
# uses: actions/download-artifact@v2
# with:
# name: production-files
# path: ./dist
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist
# deploy:
# needs: build
# runs-on: ubuntu-latest
#
# steps:
# - name: Checkout repository
# uses: actions/checkout@v2
#- name: Set up Node.js
# uses: actions/setup-node@v3
#with:
# node-version: 16
#- name: Install dependencies
# run: npm install -g gh-pages
#- name: Deploy to GitHub Pages
# run: |
# cd D:\a\smart-charger-web\smart-charger-web\Software\smart-charger\dist
# npx gh-pages -d ../../../../gh-pages
#- name: Deploy to GitHub Pages
# uses: peaceiris/actions-gh-pages@v3
#with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
#publish_dir: |
# cd ../..
# ./dist