deployment stuff
This commit is contained in:
parent
11b08e47f8
commit
b656adc23d
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,4 +1,4 @@
|
|||||||
.idea
|
.idea
|
||||||
node_modules
|
node_modules
|
||||||
public/
|
public/
|
||||||
|
COVID-19/
|
||||||
|
4
deploy.sh
Executable file
4
deploy.sh
Executable file
@ -0,0 +1,4 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
scp -r ./data ./tmpl generate.js update.sh package.json yarn.lock .nvmrc \
|
||||||
|
tmont.com:/var/www/sites/covid19.tmont.com
|
@ -8,7 +8,7 @@ const pug = require('pug');
|
|||||||
const publicDir = path.join(__dirname, 'public');
|
const publicDir = path.join(__dirname, 'public');
|
||||||
const templatesDir = path.join(__dirname, 'tmpl');
|
const templatesDir = path.join(__dirname, 'tmpl');
|
||||||
const dataDir = path.join(__dirname, 'data');
|
const dataDir = path.join(__dirname, 'data');
|
||||||
const covidDataDir = path.resolve(path.join(__dirname, '..', 'COVID-19', 'csse_covid_19_data'));
|
const covidDataDir = path.resolve(path.join(__dirname, 'COVID-19', 'csse_covid_19_data'));
|
||||||
const timeSeriesDir = path.join(covidDataDir, 'csse_covid_19_time_series');
|
const timeSeriesDir = path.join(covidDataDir, 'csse_covid_19_time_series');
|
||||||
|
|
||||||
const promiseMe = (fn) => {
|
const promiseMe = (fn) => {
|
||||||
|
@ -7,7 +7,9 @@
|
|||||||
"bootstrap": "4.4.1",
|
"bootstrap": "4.4.1",
|
||||||
"chart.js": "2.9.3",
|
"chart.js": "2.9.3",
|
||||||
"csv-parse": "4.8.9",
|
"csv-parse": "4.8.9",
|
||||||
"pug": "2.0.4",
|
"pug": "2.0.4"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
"serve": "11.3.0"
|
"serve": "11.3.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
24
update.sh
Executable file
24
update.sh
Executable file
@ -0,0 +1,24 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
|
|
||||||
|
cd "${dir}"
|
||||||
|
|
||||||
|
. /home/tmont/.nvm/nvm.sh
|
||||||
|
nvm use
|
||||||
|
yarn install --production --non-interactive --pure-lockfile
|
||||||
|
|
||||||
|
if [[ ! -d "./COVID-19" ]]; then
|
||||||
|
git clone --depth 1 https://github.com/CSSEGISandData/COVID-19.git
|
||||||
|
else
|
||||||
|
(cd COVID-19 && git pull)
|
||||||
|
fi
|
||||||
|
|
||||||
|
rm -rf ./public/
|
||||||
|
./generate.js
|
||||||
|
|
||||||
|
rsync -va ./public/ ./live/
|
||||||
|
echo $(date)
|
||||||
|
echo
|
Loading…
Reference in New Issue
Block a user