paul-tqh-nguyen / arxiv_as_a_newspaper

arxiv.org portrayed as if it were a news paper.
0 stars 0 forks source link

Add a `-deploy` CLI command to our top-level app #52

Closed paul-tqh-nguyen closed 5 years ago

paul-tqh-nguyen commented 5 years ago

This will make it much easier for us to deploy in the future.

paul-tqh-nguyen commented 5 years ago

https://github.com/paul-tqh-nguyen/arxiv_as_a_newspaper/commit/da60cf41920e9e823a3dbc88793e180706a9efd6

This'll do it.

Here's what we get:

pnguyen@pnguyenmachine:~/code/arxiv_as_a_newspaper$ ./arxiv_as_a_newspaper.py 
No process was specified. Please specify one of run_etl_process, start_front_end_server, end_to_end, or deploy.

usage: arxiv_as_a_newspaper.py [-h] [-run-etl-process] [-start-front-end-server] [-end-to-end] [-deploy]

optional arguments:
  -h, --help            show this help message and exit
  -run-etl-process      To execute our ETL entire process (i.e. scraping https://arxiv.org/ and storing the results into our DB). You will be prompted for credentials to write to our DB.
  -start-front-end-server
                        To simply use our front end interface (the info for the papers shown will be from our latest scrape of https://arxiv.org/).
  -end-to-end           To run our entire end-to-end process (which is simply running our ETL process, writing the results to our DB, and then starting the front end server).
  -deploy               To deploy local front end changes to our demo site at https://paul-tqh-nguyen.github.io/arxiv_as_a_newspaper/.
pnguyen@pnguyenmachine:~/code/arxiv_as_a_newspaper$ ./arxiv_as_a_newspaper.py -deploy
Deploying local front end changes to our demo site at https://paul-tqh-nguyen.github.io/arxiv_as_a_newspaper/

Credentials may be requested.

Starting deployment...

npm WARN npm npm does not support Node.js v10.15.2
npm WARN npm You should probably upgrade to a newer version of node as we
npm WARN npm can't make any promises that npm will work with this version.
npm WARN npm Supported releases of Node.js are the latest release of 4, 6, 7, 8, 9.
npm WARN npm You can find the latest version at https://nodejs.org/

> front_end@0.1.0 predeploy /home/pnguyen/code/arxiv_as_a_newspaper/front_end
> npm run build

npm WARN npm npm does not support Node.js v10.15.2
npm WARN npm You should probably upgrade to a newer version of node as we
npm WARN npm can't make any promises that npm will work with this version.
npm WARN npm Supported releases of Node.js are the latest release of 4, 6, 7, 8, 9.
npm WARN npm You can find the latest version at https://nodejs.org/

> front_end@0.1.0 build /home/pnguyen/code/arxiv_as_a_newspaper/front_end
> react-scripts build

Creating an optimized production build...
Compiled successfully.

File sizes after gzip:

  36.84 KB  build/static/js/2.2668f2aa.chunk.js
  3.22 KB   build/static/js/main.19e0c645.chunk.js
  1.39 KB   build/static/css/main.078745b6.chunk.css
  779 B     build/static/js/runtime~main.d44947d7.js

The project was built assuming it is hosted at /arxiv_as_a_newspaper/.
You can control this with the homepage field in your package.json.

The build folder is ready to be deployed.
To publish it at https://paul-tqh-nguyen.github.io/arxiv_as_a_newspaper , run:

  npm run deploy

Find out more about deployment here:

  https://bit.ly/CRA-deploy

> front_end@0.1.0 deploy /home/pnguyen/code/arxiv_as_a_newspaper/front_end
> gh-pages -d build

Published

Deployment finished!
pnguyen@pnguyenmachine:~/code/arxiv_as_a_newspaper$