Skip to content

Commit 4672ee1

Browse files
ErioldDaniel Montoya
andauthored
Documentation (#580)
* feat(yml): configuration jobs to deploy gh-pages * feat(deploy): other deploy ui-kit * feat(release): correction release of build deploy --------- Co-authored-by: Daniel Montoya <daniel.montoya@eclass.cl>
1 parent 79e334c commit 4672ee1

File tree

2 files changed

+108
-87
lines changed

2 files changed

+108
-87
lines changed

.github/workflows/nodejs.yml

Lines changed: 95 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,14 @@ jobs:
2626
- name: Install dependencies and regenerate package-lock.json
2727
run: npm install
2828
- name: Clean install on CI
29-
run: npm ci
29+
run: |
30+
if [ -e yarn.lock ]; then
31+
yarn install --frozen-lockfile
32+
elif [ -e package-lock.json ]; then
33+
npm ci
34+
else
35+
npm i
36+
fi
3037
- name: Linter code check
3138
run: npm run lint:check
3239
- name: Testing JEST
@@ -49,20 +56,27 @@ jobs:
4956
ssh-keyscan -t rsa gitlab.com >> ~/.ssh/known_hosts
5057
shell: bash
5158
- name: Clean install on CI
52-
run: npm ci
59+
run: |
60+
if [ -e yarn.lock ]; then
61+
yarn install --frozen-lockfile
62+
elif [ -e package-lock.json ]; then
63+
npm ci
64+
else
65+
npm i
66+
fi
5367
- name: Build library
5468
run: npm run build
5569
- name: Release version
5670
run: npx semantic-release@18
5771
env:
5872
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5973
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
60-
74+
6175
build-pages:
6276
name: Build to GitHub Pages
6377
needs: release
6478
runs-on: ubuntu-latest
65-
env:
79+
env:
6680
VITE_REACT_DEPLOY_DOCUMENTATION: DOCUMENTATION
6781

6882
steps:
@@ -82,7 +96,14 @@ jobs:
8296
ssh-keyscan -t rsa gitlab.com >> ~/.ssh/known_hosts
8397
shell: bash
8498
- name: Clean install on CI
85-
run: npm ci
99+
run: |
100+
if [ -e yarn.lock ]; then
101+
yarn install --frozen-lockfile
102+
elif [ -e package-lock.json ]; then
103+
npm ci
104+
else
105+
npm i
106+
fi
86107
- name: Generate new Build to Pages
87108
run: npm run build
88109
- name: Upload deploy-ready build files
@@ -92,61 +113,75 @@ jobs:
92113
path: ./dist
93114

94115
deploy-pages:
95-
name: Deploy GitHub Pages
96-
needs: build-pages
97-
runs-on: ubuntu-latest
98-
if: github.ref == 'refs/heads/main'
116+
name: Deploy GitHub Pages
117+
needs: build-pages
118+
runs-on: ubuntu-latest
119+
if: github.ref == 'refs/heads/main'
99120

100-
env:
101-
VITE_REACT_DEPLOY_DOCUMENTATION: DOCUMENTATION
121+
env:
122+
VITE_REACT_DEPLOY_DOCUMENTATION: DOCUMENTATION
102123

103-
steps:
104-
- name: Download artifact
105-
uses: actions/download-artifact@v3
106-
with:
107-
name: deploy-files
108-
path: ./dist
124+
steps:
125+
- name: Download artifact
126+
uses: actions/download-artifact@v3
127+
with:
128+
name: deploy-files
129+
path: ./dist
109130

110-
# - uses: actions/checkout@v3
111-
# - uses: actions/setup-node@v3
112-
# with:
113-
# node-version: 14.21.3
114-
# cache: 'npm'
115-
# - uses: webfactory/ssh-agent@v0.7.0
116-
# with:
117-
# ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
118-
# - name: Add Know Hosts
119-
# run: |
120-
# ssh-keyscan -t rsa gitlab.com >> ~/.ssh/known_hosts
121-
# shell: bash
122-
# - name: Clean install on CI
123-
# run: npm ci
124-
# - name: Generate new Build to Pages
125-
# run: npm run build
126-
# - name: Download artifact
127-
# uses: actions/download-artifact@v3
128-
# with:
129-
# name:
130-
# - name: Setup Node
131-
# - uses: actions/checkout@v3
132-
# - uses: actions/setup-node@v3
133-
# with:
134-
# node-version: 14.21.3
135-
# cache: 'npm'
136-
- uses: webfactory/ssh-agent@v0.7.0
137-
with:
138-
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
139-
- name: Add Know Hosts
140-
run: |
141-
ssh-keyscan -t rsa gitlab.com >> ~/.ssh/known_hosts
142-
shell: bash
143-
# - name: Clean install on CI
144-
# run: npm ci
145-
146-
- name: Deploy to GitHub Pages
147-
uses: peaceiris/actions-gh-pages@v3
148-
env:
149-
GH_TOKEN: eclass:${{ secrets.GITHUB_TOKEN }}
150-
with:
151-
github_token: ${{ secrets.GITHUB_TOKEN }}
152-
publish_dir: ./dist
131+
# - uses: actions/checkout@v3
132+
# - uses: actions/setup-node@v3
133+
# with:
134+
# node-version: 14.21.3
135+
# cache: 'npm'
136+
# - uses: webfactory/ssh-agent@v0.7.0
137+
# with:
138+
# ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
139+
# - name: Add Know Hosts
140+
# run: |
141+
# ssh-keyscan -t rsa gitlab.com >> ~/.ssh/known_hosts
142+
# shell: bash
143+
# - name: Clean install on CI
144+
# run: |
145+
# if [ -e yarn.lock ]; then
146+
# yarn install --frozen-lockfile
147+
# elif [ -e package-lock.json ]; then
148+
# npm ci
149+
# else
150+
# npm i
151+
# fi
152+
# - name: Generate new Build to Pages
153+
# run: npm run build
154+
# - name: Download artifact
155+
# uses: actions/download-artifact@v3
156+
# with:
157+
# name:
158+
# - name: Setup Node
159+
# - uses: actions/checkout@v3
160+
# - uses: actions/setup-node@v3
161+
# with:
162+
# node-version: 14.21.3
163+
# cache: 'npm'
164+
- uses: webfactory/ssh-agent@v0.7.0
165+
with:
166+
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
167+
- name: Add Know Hosts
168+
run: |
169+
ssh-keyscan -t rsa gitlab.com >> ~/.ssh/known_hosts
170+
shell: bash
171+
# - name: Clean install on CI
172+
# run: |
173+
# if [ -e yarn.lock ]; then
174+
# yarn install --frozen-lockfile
175+
# elif [ -e package-lock.json ]; then
176+
# npm ci
177+
# else
178+
# npm i
179+
# fi
180+
181+
- name: Deploy to GitHub Pages
182+
uses: peaceiris/actions-gh-pages@v3
183+
env:
184+
GH_TOKEN: eclass:${{ secrets.GITHUB_TOKEN }}
185+
with:
186+
github_token: ${{ secrets.GITHUB_TOKEN }}
187+
publish_dir: ./dist

package-lock.json

Lines changed: 13 additions & 27 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)