Skip to content

Commit

Permalink
Merge pull request #3 from AgataBialoskorska/new-workflow
Browse files Browse the repository at this point in the history
rewrite yml to adjust files copying to dist
  • Loading branch information
AgataBialoskorska authored Mar 14, 2024
2 parents 0fdcac0 + 0d51017 commit 045922d
Showing 1 changed file with 53 additions and 15 deletions.
68 changes: 53 additions & 15 deletions .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,66 @@
name: Node.js CI
# name: Node.js CI
# on:
# push:
# branches: [ master ]
# jobs:
# build:
# runs-on: ubuntu-latest
# steps:
# # https://github.com/actions/checkout
# - uses: actions/checkout@v3
# # a standard step for GitHub actions on Node
# # https://github.com/actions/setup-node
# - uses: actions/setup-node@v3
# with:
# # update the Node version to meet your needs
# node-version: 21
# cache: npm
# - name: Build
# run: |
# npm ci
# npm install
# npm run build
# - name: Deploy
# # https://github.com/JamesIves/github-pages-deploy-action
# uses: JamesIves/[email protected]
# with:
# branch: gh-pages
# folder: dist


name: Build and Deploy

on:
push:
branches: [ master ]
branches:
- master

jobs:
build:
runs-on: ubuntu-latest

steps:
# https://github.com/actions/checkout
- uses: actions/checkout@v3
# a standard step for GitHub actions on Node
# https://github.com/actions/setup-node
- uses: actions/setup-node@v3
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v3
with:
# update the Node version to meet your needs
node-version: 21
cache: npm
node-version: '21'
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Build
run: |
npm ci
npm install
npm run build
run: npm run build

- name: Copy assets
run: cp -R src/components/img dist/img

- name: Deploy
# https://github.com/JamesIves/github-pages-deploy-action
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: dist
folder: dist

0 comments on commit 045922d

Please sign in to comment.