Home > Blockchain >  How to deploy Nuxt via FTP to a subdomain?
How to deploy Nuxt via FTP to a subdomain?

Time:09-30

I have a static nuxt project version 2.14.12. I've setup a github deployment action to deploy my master and staging branch to different parts of my shared server via ftp deploy.

I have a staging.example.com(staging branch), and an example.com(master branch).

I'm trying to figure out how to fix the routing for my staging.example.com, my master branch works fine, my staging branch has all the files in there from the .dist folder after deployment, but the routing on the files are not correct and i get a 404 error on one of the js files in the _nuxt folder.

How can I fix the routing with env inside my nuxt.config.js file?

CodePudding user response:

so this was a caching issue, I reset my dynamic cache via siteground supercacher, nuxt had already taken care of the routing for my staging.yml file, if you guys were interested in the flow i used via ftp deploy, below is my staging.yml file:

on: 
  push:
    branches:
      - staging
name:            
  • Related