Fix deploy

This commit is contained in:
Chocobozzz 2019-09-09 14:58:52 +02:00
parent 3809f8c90c
commit 74ec683431
No known key found for this signature in database
GPG key ID: 583A612D890159BE
2 changed files with 17 additions and 17 deletions

View file

@ -5,7 +5,7 @@ stages:
pages: pages:
stage: deploy stage: deploy
script: script:
- npm install - yarn install --pure-lockfile
- npm run preview - npm run preview
- mv -f public/$CI_PROJECT_NAME/* public - mv -f public/$CI_PROJECT_NAME/* public
artifacts: artifacts:
@ -15,21 +15,21 @@ pages:
paths: paths:
- node_modules/ - node_modules/
production: #production:
stage: deploy #stage: deploy
script: #script:
- npm install #- npm install
- npm run prod #- npm run prod
- cp ./public/fr/index.html ./public/index.html #- cp ./public/fr/index.html ./public/index.html
- for f in $(find -type l);do cp --remove-destination $(readlink -f $f) $f;done; #- for f in $(find -type l);do cp --remove-destination $(readlink -f $f) $f;done;
- mkdir "${HOME}/.ssh" #- mkdir "${HOME}/.ssh"
- chmod 700 "${HOME}/.ssh" #- chmod 700 "${HOME}/.ssh"
- if [ ! -z ${DEPLOYEMENT_KNOWN_HOSTS+x} ]; then echo -e "${DEPLOYEMENT_KNOWN_HOSTS}" > ${HOME}/.ssh/known_hosts; fi #- if [ ! -z ${DEPLOYEMENT_KNOWN_HOSTS+x} ]; then echo -e "${DEPLOYEMENT_KNOWN_HOSTS}" > ${HOME}/.ssh/known_hosts; fi
- eval `ssh-agent -s` #- eval `ssh-agent -s`
- if [ ! -z ${DEPLOYEMENT_KEY+x} ]; then ssh-add <(echo "${DEPLOYEMENT_KEY}" | base64 --decode -i); fi #- if [ ! -z ${DEPLOYEMENT_KEY+x} ]; then ssh-add <(echo "${DEPLOYEMENT_KEY}" | base64 --decode -i); fi
- if [ ! -z ${DEPLOYEMENT_KEY+x} ]; then cd public && echo "put -r ." | sftp ${DEPLOYEMENT_USER}@${DEPLOYEMENT_HOST}:../../web; fi #- if [ ! -z ${DEPLOYEMENT_KEY+x} ]; then cd public && echo "put -r ." | sftp ${DEPLOYEMENT_USER}@${DEPLOYEMENT_HOST}:../../web; fi
only: #only:
- master #- master
# Push new translations strings to https://trad.framasoft.org # Push new translations strings to https://trad.framasoft.org
#trads: #trads:

View file

@ -136,7 +136,7 @@ if (process.env.NODE_ENV === 'development') {
const routes = [root]; const routes = [root];
const pages = []; const pages = [];
// Import pages list // Import pages list
fs.readdirSync('./app/components/pages').forEach(file => { fs.readdirSync('./app/views').forEach(file => {
pages.push(file.replace(/(.*)\.vue/, '$1')); pages.push(file.replace(/(.*)\.vue/, '$1'));
}); });
// Localized routes // Localized routes