Skip to content

Commit

Permalink
Update cd.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
irosic20 authored Jan 8, 2024
1 parent 9c6adb6 commit f41b164
Showing 1 changed file with 21 additions and 33 deletions.
54 changes: 21 additions & 33 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,6 @@
# Simple workflow for deploying static content to GitHub Pages
name: Deploy static content to Pages

on:
push:
branches: ["feature/*","develop","main","hotfix/*"]
pull_request:
branches: ["feature/*","develop","main","hotfix/*"]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets the GITHUB_TOKEN permissions to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow one concurrent deployment
concurrency:
group: 'pages'
cancel-in-progress: true
# ... (previous parts of your workflow)

jobs:
# Single deploy job since we're just deploying
deploy:
environment:
name: github-pages
Expand All @@ -31,29 +9,39 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 16

- name: List files
run: |
cd D:/a/smart-charger-web/smart-charger-web/Software/smart-charger
dir
cd D:/a/smart-charger-web/smart-charger-web/Software/smart-charger
dir
- name: Install dependencies
run: |
cd D:/a/smart-charger-web/smart-charger-web/Software/smart-charger
npm install
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
cd D:/a/smart-charger-web/smart-charger-web/Software/smart-charger
npm run build
- name: Setup Pages
uses: actions/configure-pages@v3

- name: Upload artifact
uses: actions/upload-pages-artifact@v2
uses: actions/upload-artifact@v2
with:
# Upload dist repository
path: './dist'
name: dist
path: ./dist

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
artifact-name: dist

0 comments on commit f41b164

Please sign in to comment.