-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from AgataBialoskorska/new-workflow
rewrite yml to adjust files copying to dist
- Loading branch information
Showing
1 changed file
with
53 additions
and
15 deletions.
There are no files selected for viewing
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
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 |