Update .forgejo/workflows/deploy.yaml
All checks were successful
deploy blog / deploy (push) Successful in 1m7s
All checks were successful
deploy blog / deploy (push) Successful in 1m7s
This commit is contained in:
parent
92ad2f06f6
commit
52a09f97e5
1 changed files with 8 additions and 4 deletions
|
|
@ -31,10 +31,15 @@ jobs:
|
||||||
- name: Render site
|
- name: Render site
|
||||||
run: ./build.sh
|
run: ./build.sh
|
||||||
|
|
||||||
|
- name: Setup SSH
|
||||||
|
run: |
|
||||||
|
mkdir -p -m0700 .ssh
|
||||||
|
echo "${{ secrets.KNOWN_HOSTS }}" | base64 -d > .ssh/known_hosts
|
||||||
|
chmod 644 .ssh/known_hosts
|
||||||
|
|
||||||
- name: Setup SSH key
|
- name: Setup SSH key
|
||||||
if: forgejo.ref_name == 'staging'
|
if: forgejo.ref_name == 'staging'
|
||||||
run: |
|
run: |
|
||||||
mkdir -p .ssh
|
|
||||||
echo "${{ secrets.SSH_PRIVATE_KEY_STAGING }}" | base64 -d > .ssh/id_ed25519
|
echo "${{ secrets.SSH_PRIVATE_KEY_STAGING }}" | base64 -d > .ssh/id_ed25519
|
||||||
chmod 600 .ssh/id_ed25519
|
chmod 600 .ssh/id_ed25519
|
||||||
ssh-keygen -f .ssh/id_ed25519 -y > .ssh/id_ed25519.pub
|
ssh-keygen -f .ssh/id_ed25519 -y > .ssh/id_ed25519.pub
|
||||||
|
|
@ -43,7 +48,6 @@ jobs:
|
||||||
- name: Setup SSH key
|
- name: Setup SSH key
|
||||||
if: forgejo.ref_name == 'production'
|
if: forgejo.ref_name == 'production'
|
||||||
run: |
|
run: |
|
||||||
mkdir -p .ssh
|
|
||||||
echo "${{ secrets.SSH_PRIVATE_KEY_PRODUCTION }}" | base64 -d > .ssh/id_ed25519
|
echo "${{ secrets.SSH_PRIVATE_KEY_PRODUCTION }}" | base64 -d > .ssh/id_ed25519
|
||||||
chmod 600 .ssh/id_ed25519
|
chmod 600 .ssh/id_ed25519
|
||||||
ssh-keygen -f .ssh/id_ed25519 -y > .ssh/id_ed25519.pub
|
ssh-keygen -f .ssh/id_ed25519 -y > .ssh/id_ed25519.pub
|
||||||
|
|
@ -51,11 +55,11 @@ jobs:
|
||||||
|
|
||||||
- name: Sync rendered site to staging
|
- name: Sync rendered site to staging
|
||||||
if: forgejo.ref_name == 'staging'
|
if: forgejo.ref_name == 'staging'
|
||||||
run: rsync -var -e 'ssh -i .ssh/id_ed25519' ./public/ deploy@www.berlin.ccc.de:srv/http/www-staging/
|
run: rsync -var -e 'ssh -i .ssh/id_ed25519 -O "HostKeyAlgorithms=ssh-ed25519"' ./public/ deploy@www.berlin.ccc.de:srv/http/www-staging/
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
- name: Sync rendered site to production
|
- name: Sync rendered site to production
|
||||||
if: forgejo.ref_name == 'production'
|
if: forgejo.ref_name == 'production'
|
||||||
run: rsync -var -e 'ssh -i .ssh/id_ed25519' ./public/ deploy@www.berlin.ccc.de:srv/http/www/
|
run: rsync -var -e 'ssh -i .ssh/id_ed25519 -O "HostKeyAlgorithms=ssh-ed25519"' ./public/ deploy@www.berlin.ccc.de:srv/http/www/
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
|
||||||
- name: Cleanup
|
- name: Cleanup
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue