How to push changes for an Octopress blog on GitHub? - ruby

I've gone through the Octopress setup and deploy instructions, and I have Octopress running on Github: http://wmerydith.github.com
My repo is set to the default branch of Master.
I now want to push changes to the config file, like changing the url:, title: and subtitle:. I made these changes, committed them, and then did a rake deploy, but the changes are not showing up.
What's unclear to me is the difference in process for pushing config changes, content changes and at some point, new updates to the Octopress blog.
For instance, will I use rake deploy to push config and content changes?
Will I ever need to run rake generate or rake deploy again? How do I push source changes when Octopress updates?

From the documentation, you might want to do a:
rake generate
before the rake deploy.
This will:
generate your blog,
copy the generated files into _deploy/,
add them to git,
commit and push them up to the master branch.
In a few seconds you should get an email from Github telling you that your commit has been received and will be published on your site.
The OP Will Merydith comments:
I am unclear on is if 'rake deploy' is enough to push content changes to the blog.
I'm seeing some issue with content not making it to the blog and am unclear if the error is how I am deploying or something else
I confirm the Rakefile task :deploy will execute default_deploy which will execute task :push.

Related

Changes not reflecting on browser after deploying code on heroku node js app

I have an app on Heroku. According to the Heroku App deploy guide I followed the below steps to modify the master.
Steps to make the push on Heroku
$ git add .
$ git commit -am "make it better"
$ git push Heroku master
The build of deploy was successful but the changes didn't reflect on the browser. I used hard refresh multiple times but didn't work.
If your app requires a build step to compress and combine assets and you are not seeing recent changes, then it's likely that you are forgetting to run that build step.
If you are using package such as parcel-bundler. you should run it before you deploy it. That would solve the issue.
You can read more on how to run it automatically whenever you deploy your app from here.
https://devcenter.heroku.com/articles/node-best-practices#hook-things-up

Is there any way to prove a heroku deployment corresponds to a github repo?

I want to set an opensource project where users can be sure that the deployed version .heroku.com corresponds with the actual source code in github master branch github.com/
Is there any way to prove a heroku deployment corresponds to a github repo?
Your app can spit out the latest deployed Git SHA if it has the "Dyno Metadata" feature turned on: https://devcenter.heroku.com/articles/dyno-metadata
Using that, you can show the latest SHA and compare it against the public repo.
Also, to add to what Jon said, you can do this via the heroku releases command. Every release, be it a code deployment, config var is 'tagged' - the command will show you everything that has changed on your app and a deploy will show the short git SHA, you can copy the SHA and then use the git command to search the repo for it.
eg.
assuming heroku releases returns
v10 Deploy 33f21247 foo#bah.com 2018/09/03 10:01:38 +0100
then you could do:
git cat-file commit 33f21247
which will then output the corresponding match, or a message saying it's not found. Obviously, this assumes your local repo is in sync with GitHub. To check it against GitHub you'd need to open your repo on GitHub like:
https://github.com/heroku/{projectname}/commit/{sha}
which will show the same commit on GitHub.

Exclude files to avoid triggering Heroku CI

Currently my Heroku CI tests are triggered on all git push to master branch at Github.
Is it possible to avoid triggering CI tests if specific files are being pushed, such as README.md?
Pretty sure heroku processes the .slugignore file for CI as there's an open issue now for ignoring it: https://github.com/heroku/heroku-ci/issues/39
The slugignore docs say
The .slugignore file causes files to be removed after you push code to Heroku and before the buildpack runs.
I don't use heroku ci so I wasn't able to test for sure. YMMV

Pointing bundler to local fork besides master branch?

I was looking into what options there were for pointing bundler/Gemfile to local forks of repos and came across "Local Git Repositories" on the bundler.io site but it appears since you have to specify a branch, if you're working off a specific feature branch such as ticket###-some-task then you would have to go into the Gemfile and update the branch: parameter to point to that instead otherwise bundler will complain that a different branch is checked out.
Is there a simpler way to point at a feature branch if you're working on 2 or more projects at the same time? Here's an example:
# project-1 Gemfile
gem 'project-2', git: 'git#local.repo.com:org/project-2', branch: 'master'
# project-2 is checked out to a branch called 'new-changes'
I then run: bundle config local.project-2 /path/to/project-2
Do I have to go into project-1 Gemfile and change the branch to new-changes every time I encounter something like this? Then when I'm done with the code change in project-2 and it's been merged into master, I would have to remember to go back into the Gemfile and change new-changes back to master?
It seems like you could run into the issue where developers would forget to change the branch back to master in the project-1 Gemfile?

Deploy WebSharper.Suave web application to Heroku

I can not understand what I need to change to make it.
I created a demo project from this blogpost with app.json and Procfile:
web: fsharpi-heroku WebsahrperSuaveHerokuExample1.sln
Next, I tried to deploy it to Heroku in accordance with these recommendations:
heroku create websahrper-with-suave-example --buildpack https://github.com/SuaveIO/mono-script-buildpack.git
heroku git:remote -a websahrper-with-suave-example
git push heroku master
There was an error in Heroku when building the project:
...
Import process completed.
-----> packages.config found, installing dependencies with nuget
Cannot open assembly 'install': No such file or directory.
! Push rejected, failed to compile SuaveFramework app
Could you suggest me a solution if there is one?
Have you tried here:
https://github.com/SuaveIO/heroku-getting-started
Fork it and click the Deploy to Heroku button.
Don't have the rep to comment on the above, but ademar's solution should cover as well as long as you don't have a file named "app.fsx"
The heroku buildpack checks to see if there is a script, then checks for a solution:
https://github.com/SuaveIO/mono-script-buildpack/blob/master/bin/compile#L66
Just make sure there is a .sln file in the project directory (can be empty, just needs to be present) or fork the buildpack and just make it default run mono $YOURPROJECT in the compile step.
When using an sln instead of a script, you need to change your Procfile to:
web: mono Path/execName.exe

Resources