Skip to content

Instantly share code, notes, and snippets.

@domenic
domenic / 0-github-actions.md
Last active May 26, 2024 07:43
Auto-deploying built products to gh-pages with Travis

Auto-deploying built products to gh-pages with GitHub Actions

This is a set up for projects which want to check in only their source files, but have their gh-pages branch automatically updated with some compiled output every time they push.

A file below this one contains the steps for doing this with Travis CI. However, these days I recommend GitHub Actions, for the following reasons:

  • It is much easier and requires less steps, because you are already authenticated with GitHub, so you don't need to share secret keys across services like you do when coordinate Travis CI and GitHub.
  • It is free, with no quotas.
  • Anecdotally, builds are much faster with GitHub Actions than with Travis CI, especially in terms of time spent waiting for a builder.
@cboehme
cboehme / travis-encrypt.sh
Last active December 15, 2015 04:50
This bash script encrypts data so that it can be used with Travis' encryption key feature (http://about.travis-ci.org/docs/user/encryption-keys/). In contrast to the `travis encrypt` CLI utility it does not require ruby. The script requires `wget` and `openssl`.
#!/bin/bash
PK_FILE="__travis-key.pub"
CERT_FILE="__travis-root-cert.pem"
# Root CA for the certificate used in the https connection with
# the travis api (only required if the root CA certificate is
# not already installed which does not seem to be the case
# with Cygwin):
CA_CERTIFICATE="-----BEGIN CERTIFICATE-----