Skip to content

Commit

Permalink
feat(release): correction release of build deploy (#581)
Browse files Browse the repository at this point in the history
Co-authored-by: Daniel Montoya <daniel.montoya@eclass.cl>
  • Loading branch information
Eriold and Daniel Montoya committed Sep 14, 2023
1 parent 4672ee1 commit 6057aed
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 81 deletions.
44 changes: 1 addition & 43 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ jobs:
npm i
fi
- name: Generate new Build to Pages
run: npm run build
run: npm run deploy
- name: Upload deploy-ready build files
uses: actions/upload-artifact@v3
with:
Expand All @@ -128,55 +128,13 @@ jobs:
name: deploy-files
path: ./dist

# - uses: actions/checkout@v3
# - uses: actions/setup-node@v3
# with:
# node-version: 14.21.3
# cache: 'npm'
# - uses: webfactory/ssh-agent@v0.7.0
# with:
# ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
# - name: Add Know Hosts
# run: |
# ssh-keyscan -t rsa gitlab.com >> ~/.ssh/known_hosts
# shell: bash
# - name: Clean install on CI
# run: |
# if [ -e yarn.lock ]; then
# yarn install --frozen-lockfile
# elif [ -e package-lock.json ]; then
# npm ci
# else
# npm i
# fi
# - name: Generate new Build to Pages
# run: npm run build
# - name: Download artifact
# uses: actions/download-artifact@v3
# with:
# name:
# - name: Setup Node
# - uses: actions/checkout@v3
# - uses: actions/setup-node@v3
# with:
# node-version: 14.21.3
# cache: 'npm'
- uses: webfactory/ssh-agent@v0.7.0
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Add Know Hosts
run: |
ssh-keyscan -t rsa gitlab.com >> ~/.ssh/known_hosts
shell: bash
# - name: Clean install on CI
# run: |
# if [ -e yarn.lock ]; then
# yarn install --frozen-lockfile
# elif [ -e package-lock.json ]; then
# npm ci
# else
# npm i
# fi

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"ts-compile-check": "tsc -p tsconfig.json",
"prepare": "ts-patch install -s && node ./prepare.js",
"preinstall": "npm install --package-lock-only --ignore-scripts && npx npm-force-resolutions",
"deploy": "gh-pages -d dist"
"deploy": "VITE_REACT_DEPLOY_DOCUMENTATION=DOCUMENTATION vite build"
},
"publishConfig": {
"access": "public"
Expand Down
11 changes: 0 additions & 11 deletions src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,4 @@ if (import.meta.env.VITE_REACT_DEPLOY_DOCUMENTATION === 'DOCUMENTATION') {
)
} else {
import('./index')
// ReactDOM.render(
// // <React.StrictMode>
// // <h1>HOLA</h1>
// // </React.StrictMode>,
// // document.getElementById('root')
// <React.StrictMode>
// <h1>HOLA</h1>
// {/* {modulesExports} */}
// </React.StrictMode>,
// document.getElementById('root')
// )
}
27 changes: 1 addition & 26 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,11 @@ import path from 'path'

let myDefineConfig

const buildEnv = process.env.VITE_REACT_DEPLOY_DOCUMENTATION ?? 'PRODUCTION'
const buildEnv = process.env.VITE_REACT_DEPLOY_DOCUMENTATION

// if (import.meta.env.VITE_REACT_DEPLOY_DOCUMENTATION === 'DOCUMENTATION') {
if (buildEnv === 'DOCUMENTATION') {
myDefineConfig = {
plugins: [react(), tsconfigPaths()],
base: '/@eclass-ui-kit/',
build: {
sourcemap: true,
},
Expand Down Expand Up @@ -44,27 +42,4 @@ if (buildEnv === 'DOCUMENTATION') {
}
}

// export default defineConfig({
// plugins: [react(), tsconfigPaths()],
// build: {
// lib: {
// entry: path.resolve(__dirname, 'src/index.ts'),
// name: '@eclass/ui-kit',
// fileName: (format) => `eclass-ui-kit.${format}.js`,
// },
// sourcemap: true,
// rollupOptions: {
// // make sure to externalize deps that shouldn't be bundled
// // into your library
// external: ['react'],
// output: {
// // Provide global variables to use in the UMD build
// // for externalized deps
// globals: {
// react: 'React',
// },
// },
// },
// },
// })
export default defineConfig(myDefineConfig)

0 comments on commit 6057aed

Please sign in to comment.