Can you use Gitlab CI / CD to build a Vue page and host it using Gitlab pages? - vue.js

I have uploaded my code for a Vuejs site to Gitlab and if I build it using the Vuejs ui I get a valid website and everything works fine. How would I build my website using Gitlabs CI / CD?

Found it: https://about.gitlab.com/2017/09/12/vuejs-app-gitlab/
Thank you, Billal Begueradj!

Related

How to use cypress e2e tests with Vue CLI in history mode?

I am trying to run my cypress e2e tests in a Github CI on a Vue 2 SPA using CLI. Locally they work fine when running ./node_modules/.bin/vue-cli-service test:e2e. But navigation inside the testing framework with cy.visit(), e.g. to /login fails inside the CI pipeline with a 404 - requested path not found.
As I am aware, docs state:
Since our app is a single page client side app, without a proper server configuration, the users will get a 404 error if they access http://oursite.com/user/id directly in their browser.
When running the production build manually using npm serve it faces the same struggle. Vue-Routes navigation works as expected, but calling sub-routes fails with a 404. Production with a NginX reverse proxy works as expected.
So:
Why does the dev server work locally when Vue CLI is serving itself?
How to redirect all sub-route requests to index.html for the cypress e2e tests?
Edit: Weird thing is. Running serve ./dist with the silent flag -s fixes the redirection problems completely. Doesn't make sense to me.

Is it possible to connect a GitHub repo with a Vercel Project without opening a browser?

Assuming I have:
GitHub and Vercel accounts already setup,
Am using GitHub CLI and Vercel CLI
Is it possible to connect a GitHub repo with a Vercel Project without opening the browser?
I know I can create a GitHub remote repo with:
gh repo create --source=. --public --remote=origin --push
And then, deploy to Vercel via the interactive CLI:
vercel
But I still have to open the browser and manually click the Connect Git Repository button in Vercel.
Am I missing something or can this not be done entirely via the terminal?

After deployment, Vue Nuxt SPA is not correctly displayed even though yarn start does work

summery
I"ve tried to deploy sample Vue Nuxt SPA to AWS S3.
My Sample SPA is correctly displayed in my local Ubuntu20.04 environment with yarn start.
However SPA on S3 does not work correctly and shows error.
I want to know how to deloy correctly and show the same content as I did in my local environment.
what I've tried
Run yarn start
Confirm SPA does work in my local environment.
Run yarn generate.
Deploy /dist to S3.
Configure S3 access rigihts.
Confirm SPA does not work correctly in S3.
show some codes
here is the github repo I've tried.
https://github.com/jpskgc/vue-nuxt-spa-sample/tree/main

nuxt spa is stuck on loading screen when deployed on CPanel while it works fine on local server

I have a nuxt project which was written by someone else. I built a production build by using nuxt build --spa and tested the build in dist folder locally b using PHP's built in server and it worked fine.
But after deploying to the CPanel hosting, it's just stuck on the loading screen and does not load. I'm new to Nuxt so I'm not sure what is the problem here. The url of the staging site is here http://staging.sustainabilityinnocenter.com. Please let me know what could be the problem

How to make an isomorphic JavaScript app with Mithril JS

I'd like to be able to render javascript templates using the Mithril JS framework on the server for SEO and first load purposes and have them run in the browser.
See this blog post:
https://gist.github.com/StephanHoyer/bddccd9e159828867d2a
And this example repo:
https://github.com/StephanHoyer/mithril-isomorphic-example
to run the demo, simply
Clone the repo
cd into it
run npm install
run node server
Give my new framework (https://github.com/ezramorse/mens) a whirl for an out of box solution
npm install mens
node node_modules/mens/example/server.js
Or just require('mens') from the root and start from scratch!