mirror of
https://github.com/NohamR/gitprofile.git
synced 2026-05-25 12:27:17 +00:00
Create CI-CD.yml
This commit is contained in:
committed by
GitHub
parent
536bbcf15a
commit
71d2c30130
41
.github/workflows/CI-CD.yml
vendored
Normal file
41
.github/workflows/CI-CD.yml
vendored
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
name: Build and Publish to gh-pages branch
|
||||||
|
|
||||||
|
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@v1
|
||||||
|
with:
|
||||||
|
node-version: '14'
|
||||||
|
cache: 'npm'
|
||||||
|
cache-dependency-path: subdir/package-lock.json
|
||||||
|
|
||||||
|
- name: Cache dependencies
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
**/node_modules
|
||||||
|
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: npm install
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: npm run build
|
||||||
|
env:
|
||||||
|
CI: ""
|
||||||
|
|
||||||
|
- name: Deploy 🚀
|
||||||
|
uses: JamesIves/github-pages-deploy-action@4.1.4
|
||||||
|
with:
|
||||||
|
branch: gh-pages
|
||||||
|
folder: build
|
||||||
Reference in New Issue
Block a user