[scraper] deploy to google app engine
This commit is contained in:
28
.github/workflows/deploy-pipeline.yml
vendored
Normal file
28
.github/workflows/deploy-pipeline.yml
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
name: Deploy Pipeline
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'master'
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
name: Deploy
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
|
||||
- run: sed -i -e "s~@database-uri~$DATABASE_URI~g" app.yaml
|
||||
env:
|
||||
DATABASE_URI: ${{secrets.DATABASE_URI}}
|
||||
|
||||
- run: sed -i -e "s~@mongodb-uri~$MONGODB_URI~g" app.yaml
|
||||
env:
|
||||
MONGODB_URI: ${{secrets.MONGODB_URI}}
|
||||
|
||||
- uses: actions-hub/gcloud@master
|
||||
env:
|
||||
PROJECT_ID: ${{secrets.GCLOUD_PROJECT_ID}}
|
||||
APPLICATION_CREDENTIALS: ${{secrets.GOOGLE_APPLICATION_CREDENTIALS}}
|
||||
with:
|
||||
args: app -q deploy app.yaml --promote
|
||||
5
app.yaml
Normal file
5
app.yaml
Normal file
@@ -0,0 +1,5 @@
|
||||
runtime: nodejs12
|
||||
|
||||
env_variables:
|
||||
DATABASE_URI: @database-uri
|
||||
MONGODB_URI: @mongodb-uri
|
||||
@@ -4,7 +4,7 @@
|
||||
"main": "scraper/index.js",
|
||||
"engines": {
|
||||
"npm": "6.x",
|
||||
"node": "10.x"
|
||||
"node": "12.x"
|
||||
},
|
||||
"scripts": {
|
||||
"start": "node scraper/index.js"
|
||||
|
||||
Reference in New Issue
Block a user