Skip to content

Commit 6057aed

Browse files
ErioldDaniel Montoya
andauthored
feat(release): correction release of build deploy (#581)
Co-authored-by: Daniel Montoya <daniel.montoya@eclass.cl>
1 parent 4672ee1 commit 6057aed

File tree

4 files changed

+3
-81
lines changed

4 files changed

+3
-81
lines changed

.github/workflows/nodejs.yml

Lines changed: 1 addition & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ jobs:
105105
npm i
106106
fi
107107
- name: Generate new Build to Pages
108-
run: npm run build
108+
run: npm run deploy
109109
- name: Upload deploy-ready build files
110110
uses: actions/upload-artifact@v3
111111
with:
@@ -128,55 +128,13 @@ jobs:
128128
name: deploy-files
129129
path: ./dist
130130

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'
164131
- uses: webfactory/ssh-agent@v0.7.0
165132
with:
166133
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
167134
- name: Add Know Hosts
168135
run: |
169136
ssh-keyscan -t rsa gitlab.com >> ~/.ssh/known_hosts
170137
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
180138

181139
- name: Deploy to GitHub Pages
182140
uses: peaceiris/actions-gh-pages@v3

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"ts-compile-check": "tsc -p tsconfig.json",
4444
"prepare": "ts-patch install -s && node ./prepare.js",
4545
"preinstall": "npm install --package-lock-only --ignore-scripts && npx npm-force-resolutions",
46-
"deploy": "gh-pages -d dist"
46+
"deploy": "VITE_REACT_DEPLOY_DOCUMENTATION=DOCUMENTATION vite build"
4747
},
4848
"publishConfig": {
4949
"access": "public"

src/main.tsx

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,4 @@ if (import.meta.env.VITE_REACT_DEPLOY_DOCUMENTATION === 'DOCUMENTATION') {
1919
)
2020
} else {
2121
import('./index')
22-
// ReactDOM.render(
23-
// // <React.StrictMode>
24-
// // <h1>HOLA</h1>
25-
// // </React.StrictMode>,
26-
// // document.getElementById('root')
27-
// <React.StrictMode>
28-
// <h1>HOLA</h1>
29-
// {/* {modulesExports} */}
30-
// </React.StrictMode>,
31-
// document.getElementById('root')
32-
// )
3322
}

vite.config.ts

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,11 @@ import path from 'path'
77

88
let myDefineConfig
99

10-
const buildEnv = process.env.VITE_REACT_DEPLOY_DOCUMENTATION ?? 'PRODUCTION'
10+
const buildEnv = process.env.VITE_REACT_DEPLOY_DOCUMENTATION
1111

12-
// if (import.meta.env.VITE_REACT_DEPLOY_DOCUMENTATION === 'DOCUMENTATION') {
1312
if (buildEnv === 'DOCUMENTATION') {
1413
myDefineConfig = {
1514
plugins: [react(), tsconfigPaths()],
16-
base: '/@eclass-ui-kit/',
1715
build: {
1816
sourcemap: true,
1917
},
@@ -44,27 +42,4 @@ if (buildEnv === 'DOCUMENTATION') {
4442
}
4543
}
4644

47-
// export default defineConfig({
48-
// plugins: [react(), tsconfigPaths()],
49-
// build: {
50-
// lib: {
51-
// entry: path.resolve(__dirname, 'src/index.ts'),
52-
// name: '@eclass/ui-kit',
53-
// fileName: (format) => `eclass-ui-kit.${format}.js`,
54-
// },
55-
// sourcemap: true,
56-
// rollupOptions: {
57-
// // make sure to externalize deps that shouldn't be bundled
58-
// // into your library
59-
// external: ['react'],
60-
// output: {
61-
// // Provide global variables to use in the UMD build
62-
// // for externalized deps
63-
// globals: {
64-
// react: 'React',
65-
// },
66-
// },
67-
// },
68-
// },
69-
// })
7045
export default defineConfig(myDefineConfig)

0 commit comments

Comments
 (0)