-
Create a GitHub workflow file;
mkdir .github mkdir .github/worflows touch ci.yml
-
Inside the file paste the updated steps for GitHub SSH action and Deploy to GitHub Pages
name: Deploy on: push: tags: - 'GA*' # ... - name: Install SSH Client 🔑 uses: webfactory/[email protected] with: ssh-private-key: ${{ secrets.DEPLOY_KEY }} - name: Deploy 🚀 uses: JamesIves/github-pages-deploy-action@v4 with: BASE_BRANCH: master BRANCH: gh-pages CLEAN: true FOLDER: . SSH: true # ...
-
Create a SSH keys on this folder
ssh-keygen -t rsa -b 4096 -C <YOUR_EMAIL>
-
When it promted for Enter file in which to save the key change the name of the file, e.g:
repo-name
$ Generating public/private rsa key pair. $ Enter file in which to save the key (/Users/username/.ssh/id_rsa): repo-name $ Enter passphrase (empty for no passphrase): $ Enter same passphrase again:
-
Copy secret SSK key:
cat repo-name | pbcopy
-
Create a
DEPLOY_KEY
GitHub secret on your repo: Settings > Secrets > New secret and paste the secret SSH key -
Copy public SSK key
cat repo-name.pub | pbcopy
-
Create a deploy key on your GitHub repo: Settings > Deploy keys > Add deploy key and paste the public secret key
-
🚀
Last active
November 14, 2024 16:23
-
-
Save pataruco/91b6cda6b02b61b3bcd2bbbfaa963fd9 to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks very much for this, saved me a ton of time.
To save the next person even more time: I needed to change
webfactory/[email protected]
towebfactory/[email protected]