How to make a self-updating git repo with Github Actions


WARNING: Github Actions will stop running after 60 days of inactivity.

Generate a keypair (email is informational comment and can be anything):

cd /tmp
ssh-keygen -t ed25519 -C "[email protected]" -f ./deploy

You will now have two files: deploy and deploy.pub

  1. Go to Settings -> Deploy Keys (URL is github.com/org/repo/settings/keys)
  2. Add a deploy key
  3. Title: anything Key: the contents of deploy.pub Allow write access: true
  4. Go to Settings -> Secrets and variables -> Actions (URL is github.com/org/repo/settings/secrets/actions)
  5. New repository secret
  6. Name: DEPLOY_KEY Secret: contents of deploy

Use update.yaml as template for the Github Action

Date: 2024-03-07

Tags:  git

Share: