Skip to content

Commit

Permalink
finishing pr deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
jsmith committed May 2, 2020
1 parent 608eac3 commit 7b6b237
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 19 deletions.
29 changes: 15 additions & 14 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
name: Deploy

on: [push]
# push:
# tags:
# - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
on:
push:
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10

jobs:
# build_backend:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# - uses: akhileshns/[email protected]
# with:
# heroku_api_key: ${{ secrets.HEROKU_API_KEY }}
# heroku_app_name: "web-prov-backend"
# heroku_email: "[email protected]"
build_backend:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: akhileshns/[email protected]
with:
heroku_api_key: ${{ secrets.HEROKU_API_KEY }}
heroku_app_name: "web-prov-backend"
heroku_email: "[email protected]"
# TODO Use this actions once this issue is fixed thehttps://github.com/nwtgck/actions-netlify/issues/102
build_frontend:
runs-on: ubuntu-latest
steps:
Expand All @@ -24,7 +25,7 @@ jobs:
- name: Publish
uses: netlify/actions/cli@master
with:
args: deploy --dir=_site --prod --message "Deploy ${{ github.ref }}"
args: deploy --dir=_site --prod
env:
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
16 changes: 11 additions & 5 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,19 @@ on:
types: ['opened', 'edited', 'synchronize']

jobs:
deploy:
name: 'Deploy'
build_frontend:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- uses: jsmrcaga/action-netlify-deploy@master
- uses: actions/checkout@v2
- run: npm install
- run: npm run build-frontend
- name: Deploy to Netlify
uses: nwtgck/[email protected]
with:
publish-dir: '_site'
github-token: ${{ secrets.GITHUB_TOKEN }}
deploy-message: "Deploy from GitHub Actions"
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}

0 comments on commit 7b6b237

Please sign in to comment.