Comments (5)
You're right in that the Heroku Cli should be installed by default. Could you provide your buildlog and workflow file if possible?
from heroku-deploy.
Thank you very much, @AkhileshNS
`# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Dendra API CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
container: node:10.18-jessie
services:
postgres:
image: postgres
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
# Maps tcp port 5432 on service container to the host
- 5432:5432
strategy:
matrix:
node-version: [14.x]
steps:
# - name: setup ssh
# uses: webfactory/[email protected]
# with:
# ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Set up node.js v${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Clone Dendra Repo
uses: actions/checkout@v2
- name: Setup NPM Private Github Packages
run: |
echo "@general-galactic:registry=https://npm.pkg.github.com" > .npmrc
echo "//npm.pkg.github.com/:_authToken=${{secrets.GH_NPM_REGISTRY_TOKEN}}" >> .npmrc
echo "always-auth=true" >> .npmrc
# - name: Print working directory
# run: pwd
# - name: Print npm info
# run: cat .npmrc
# - name: Print env
# run: env
# - name: git clone a private repo
# run: git clone --depth=1 -q -b master git://github.com/general-galactic/hapi-swagger.git ./crap && ls ./crap
# - name: npm install from a private github repo
# run: npm i git://github.com/general-galactic/hapi-swagger && ls node_modules/hapi-swagger
# - name: npm install private github package
# run: npm i @general-galactic/dendra-jwt && ls node_modules/@general-galactic/dendra-jwt
# - name: verify ssh key works
# run: ssh -T [email protected]
# - name: Authenticate to Github Package Registry for private NPM modules
# run: echo "//npm.pkg.github.com/:_authToken=${{secrets.GH_NPM_REGISTRY_TOKEN}}" >> .npmrc
- name: Install Dendra API Dependencies
# Skiping post-install scripts here, as a malicious script could steal NODE_AUTH_TOKEN.
# running bcrypt separately since it requires a post-install script
run: npm ci
- name: Install hapi-swagger
run: npm i git://github.com/general-galactic/hapi-swagger
- name: Lint Dendra API
run: npm run lint:ci
- name: Run Tests
env:
DATABASE_URL: postgres://postgres:postgres@postgres:5432/dendra-test # the github postgres container chose all the defaults.
run: npm test
- name: Deploy to Heroku
uses: akhileshns/[email protected]
with:
heroku_api_key: ${{secrets.HEROKU_API_KEY}}
heroku_app_name: "dendra-api-stage"
heroku_email: "[email protected]"
justlogin: true
remote_branch: main
- name: Notify Slack Failure
if: failure()
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
uses: voxmedia/github-action-slack-notify-build@v1
with:
channel: build-updates
status: Dendra API Build Failed
color: danger
- name: Notify Slack Success
if: success()
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
uses: voxmedia/github-action-slack-notify-build@v1
with:
channel: build-updates
status: SUCCESS
color: good
`
from heroku-deploy.
This is the portion of the build output for the deploy. I can post the rest of the output if this isn't sufficient.
I'm new to GitHub Actions but I have experience with Jenkins and Travis. Perhaps I'm missing something obvious.
Thanks again.
`##[debug]Evaluating condition for step: 'Deploy to Heroku'
##[debug]Evaluating: success()
##[debug]Evaluating success:
##[debug]=> true
##[debug]Result: true
##[debug]Starting: Deploy to Heroku
##[debug]Loading inputs
##[debug]Evaluating: secrets.HEROKU_API_KEY
##[debug]Evaluating Index:
##[debug]..Evaluating secrets:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'HEROKU_API_KEY'
##[debug]=> ''
##[debug]Result: ''
##[debug]Loading env
Run akhileshns/[email protected]
with:
heroku_api_key: ***
heroku_app_name: dendra-api-stage
heroku_email: [email protected]
justlogin: true
remote_branch: main
branch: HEAD
dontuseforce: false
dontautocreate: false
usedocker: false
docker_heroku_process_type: web
delay: 0
rollbackonhealthcheckfailed: false
/usr/bin/docker exec d224d0edefcad3d011012710e18d99607e0374004dc00290bba841bf1aa1937a sh -c "cat /etc/*release | grep ^ID"
##[debug]ID=debian
##[debug]Running JavaScript Action with default external tool: node12
Created and wrote to ~/.netrc
/bin/sh: 1: heroku: not found
Error: Error: Command failed: heroku login
/bin/sh: 1: heroku: not found
##[debug]Node Action run completed with exit code 1
##[debug]Finishing: Deploy to Heroku`
from heroku-deploy.
I think it might have something to do with you using container: node:10.18-jessie
. It's possible that it's because the node: 10.18-jessie
image doesn't have heroku installed by default unlike the default ones used in github actions. Can you try adding the following step before the heroku deploy step and see if this works:
- name: Install Heroku Cli
run: curl https://cli-assets.heroku.com/install-ubuntu.sh | sh
from heroku-deploy.
@AkhileshNS
That was it!
My last build ran with login only so I'm actually trying to deploy now.
I truly appreciate your quick reply and the assistance. Thanks again.
from heroku-deploy.
Related Issues (20)
- Could you release major version(s) of your GitHub action? HOT 4
- Buildpack not recognized HOT 1
- [Feature request] Add action typings
- Deploy a Heroku Buildpack to Heroku Elements? HOT 1
- Don't auto deploy option
- Deploy NPM Workspaces HOT 1
- Node 16 HOT 8
- using env_file
- Please upgrade node 12 to 16 HOT 1
- heroku: Press any key to open up the browser to login or q to exit HOT 2
- How do I run a command on Heroku after deployment HOT 1
- The `set-output` command is deprecated HOT 4
- NA
- unable to deploy to Heroku due to ToS change? HOT 3
- healthcheck doesn't work with URLs with HTTP auth
- Got an error when using env_file as params
- Node Update HOT 1
- node18 should be node20 HOT 2
- Very long deployment times and logs when using `appdir`
- Deployments "silently" fail after v4 update: `remote: Pushed to branch other than [main, master], skipping build.` HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
š Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ššš
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ā¤ļø Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from heroku-deploy.