-
Notifications
You must be signed in to change notification settings - Fork 1
65 lines (61 loc) · 2.62 KB
/
deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Deploy
# Controls when the workflow will run
on:
push:
branches: [ production ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# Builds frontend and deploys project to heroku
build-deploy:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: Replace Local URL with HEROKU URL
run: |
sed -i 's/http:\/\/localhost:5000/https:\/\/ub-jobify.herokuapp.com/g' vue-gripau/src/main.js
cat vue-gripau/src/main.js
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
cache-dependency-path: vue-gripau/package-lock.json
- name: Build with Node.js
working-directory: ./vue-gripau/src
run: |
npm ci
npm run build
- name: Reset heroku database
uses: AkhileshNS/[email protected]
with:
# This will be used for authentication. You can find it in your heroku homepage account settings
heroku_api_key: ${{secrets.HEROKU_API_KEY}}
# Email that you use with heroku
heroku_email: "[email protected]"
# The appname to use for deploying/updating
heroku_app_name: "ub-jobify"
justlogin: true
- run: heroku pg:reset DATABASE -a ub-jobify --confirm ub-jobify
- name: Deploy to Heroku
# You may pin to the exact commit or the version.
# uses: AkhileshNS/heroku-deploy@79ef2ae4ff9b897010907016b268fd0f88561820
uses: AkhileshNS/[email protected]
with:
# This will be used for authentication. You can find it in your heroku homepage account settings
heroku_api_key: ${{secrets.HEROKU_API_KEY}}
# Email that you use with heroku
heroku_email: "[email protected]"
# The appname to use for deploying/updating
heroku_app_name: "ub-jobify"
# The branch that you would like to deploy to Heroku
# branch: "origin/production"
# Set this to true if you don't want to automatically create the Heroku app
dontautocreate: true
# Set if your app is located in a subdirectory.
appdir: "flask-gripau"
buildpack: "heroku/python"