So, I set up a repo that uploads to prose using GitHub CI. This is how I did it.
First I created an SSH key for me to use.
1KEY_NAME=<your key name>
2ssh-keygen -t ed25519 -f ./$KEY_NAME.key -N ''
I added the public key to pico.sh.
I added the private key to my GitHub repo secrets as CI_KEY
.
Don't commit this key, you can delete it when you're done using it.
Then, I wrote this CI script.
1name: Deploy
2
3on:
4 push:
5 branches: [ "main" ]
6 workflow_dispatch:
7
8jobs:
9 deploy-prose:
10 runs-on: ubuntu-latest
11 steps:
12 - name: Checkout
13 uses: actions/checkout@v4
14 - name: Create SSH key
15 run: echo "$SSH_KEY" > "$KEY_PATH" && chmod 600 "$KEY_PATH"
16 env:
17 KEY_PATH: ./key
18 SSH_KEY: ${{ secrets.CI_KEY }}
19 - name: Upload
20 run: rsync --rsh='ssh -o StrictHostKeyChecking=no -i ./key' *.md prose.sh:/
This is saved in .github/workflows/deploy
.
After doing these steps, GitHub should automatically deploy your prose!