unsek
So I’m trying to get Github Actions to build a release in a DO droplet. I’m able to SSH into the droplet using the SSH private key as the user config is using. I’m not really sure if the error is SSH-related or not.
action yml:
name: CD
on:
push:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-elixir@v1
with:
otp-version: 22.3
elixir-version: 1.10.2
- uses: webfactory/ssh-agent@v0.2.0
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Install dependencies
run: mix deps.get
- name: Build and deploy production release
run: |
mix edeliver build release production --verbose
mix edeliver deploy release to production --verbose
mix edeliver migrate production --verbose
mix edeliver start production --verbose
env:
HOST: ${{ secrets.HOST }}
USERNAME: ${{ secrets.USERNAME }}
edeliver logs:
-----> Ensuring hosts are ready to accept git pushes
bash is installed and the default shell
Initialized empty Git repository in /tmp/edeliver/app/builds/.git/
-----> Pushing new commits with git to: ***@***
error: src refspec master does not match any
error: failed to push some refs to '***@***:/tmp/edeliver/app/builds'
FAILED 1:
git push --tags -f ***@*** master
##[error]Process completed with exit code 1.
edeliver config:
#!/bin/bash
APP="app"
BUILD_HOST=$HOST
BUILD_USER=$USERNAME
BUILD_AT="/tmp/edeliver/$APP/builds"
START_DEPLOY=true
CLEAN_DEPLOY=true
# prevent re-installing node modules; this defaults to "."
GIT_CLEAN_PATHS="_build rel priv/static"
PRODUCTION_HOSTS=$HOST
PRODUCTION_USER=$USERNAME
DELIVER_TO="/home/$USERNAME/apps"
# For Phoenix projects, symlink prod.secret.exs to our tmp source
pre_erlang_get_and_update_deps() {
local _prod_secret_path="/home/$USERNAME/apps/$APP/secret/prod.secret.exs"
if [ "$TARGET_MIX_ENV" = "prod" ]; then
status "Linking '$_prod_secret_path'"
__sync_remote "
[ -f ~/.profile ] && source ~/.profile
mkdir -p '$BUILD_AT'
ln -sfn '$_prod_secret_path' '$BUILD_AT/config/prod.secret.exs'
"
fi
}
pre_erlang_clean_compile() {
status "Running npm install"
__sync_remote "
[ -f ~/.profile ] && source ~/.profile
set -e
cd '$BUILD_AT'/assets
npm install
"
status "Compiling assets"
__sync_remote "
[ -f ~/.profile ] && source ~/.profile
set -e
cd '$BUILD_AT'/assets
node_modules/.bin/webpack --mode production --silent
"
status "Running phoenix.digest" # log output prepended with "----->"
__sync_remote " # runs the commands on the build host
[ -f ~/.profile ] && source ~/.profile # load profile (optional)
set -e # fail if any command fails (recommended)
cd '$BUILD_AT' # enter the build directory on the build host (required)
# prepare something
mkdir -p priv/static # required by the phoenix.digest task
# run your custom task
APP='$APP' MIX_ENV='$TARGET_MIX_ENV' $MIX_CMD phx.digest $SILENCE
APP='$APP' MIX_ENV='$TARGET_MIX_ENV' $MIX_CMD phx.digest.clean $SILENCE
"
}
Trending in Questions
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
Hello,
I know there is an approach for handling lists that allows for optimized traversal, but I can’t recall the specific method (somet...
New
Documentation
While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
So my question is quite simple and i have found no conclusive answer on forum, google or AI.
Should we use :erlang.float for Integer to ...
New
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New
I recently noticed that Elixir’s Logger defaults its primary log level to :debug when no :logger, :level application configuration is pre...
New
Other Trending Topics
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
Hi there! We created Gust: A task orchestrator inspired by Airflow.
For those who have never heard about Aiflow, it’s a Python-based wor...
New
Hi everyone!
The first release candidate for the Expert language server project is now available!
We’ve published a press release detai...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixirconf-us
- #ai
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #hex
- #security










Showing Posts 1 to 6- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
PabloG6
Did you get an answer to this? I haven’t found anybody else with a similar problem.
unsek
I ended up ditching edeliver and just opted for Ansible. But if I’m not mistaken it’s because of
actions/checkout@v2shallow copying the branch or something along those lines so adding this might fix it for you too.PabloG6
Thanks but the issue isn’t with github actions for me as it is specifically with edeliver. I’ll switch over to Ansible since it provides a similar service.
knvjun
I got the same problem with edeliver on Github Actions. I tried this solution. It works for me! Thanks!
unsek
Nice! Glad it worked for you.
navinpeiris
You can also use the built in feature in actions/checkout like so: