Update .forgejo/workflows/deploy.yaml
Some checks failed
deploy blog / deploy (push) Failing after 15s
Some checks failed
deploy blog / deploy (push) Failing after 15s
Signed-off-by: xengi <cccb-git@xengi.de>
This commit is contained in:
parent
e0cad17e4e
commit
ef0df4877d
1 changed files with 14 additions and 17 deletions
|
|
@ -9,14 +9,7 @@ on:
|
|||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: System checks
|
||||
run: |
|
||||
ip a
|
||||
ip r
|
||||
ip -6 r
|
||||
cat /etc/resolv.conf
|
||||
|
||||
steps:
|
||||
- name: Install dependencies
|
||||
run: apk --no-cache add hugo python3 py3-pip git
|
||||
|
||||
|
|
@ -27,29 +20,33 @@ jobs:
|
|||
hugo version
|
||||
python --version
|
||||
|
||||
- name: Install Python depenndencies
|
||||
run: python -m pip install -r requirements.txt
|
||||
|
||||
- name: Checkout repo
|
||||
run: |
|
||||
git clone -b ${{ forgejo.ref_name }} https://git.berlin.ccc.de/cccb-website-team/www.git .
|
||||
git status
|
||||
exit 1
|
||||
|
||||
- name: Install Python depenndencies
|
||||
run: python -m pip install -r requirements.txt
|
||||
|
||||
- name: Render site
|
||||
run: ./build.sh
|
||||
|
||||
- name: Setup SSH key
|
||||
run: |
|
||||
echo ${{ secrets.SSH_PRIVATE_KEY }} > id_ed25519
|
||||
chmod 600 id_ed25519
|
||||
mkdir -p .ssh
|
||||
echo ${{ secrets.SSH_PRIVATE_KEY }} > .ssh/id_ed25519
|
||||
chmod 600 .ssh/id_ed25519
|
||||
ssh-keygen -f .ssh/id_ed25519 -y > .ssh/id_ed25519.pub
|
||||
cat .ssh/id_ed25519.pub
|
||||
|
||||
- name: Sync rendered site to staging
|
||||
if: forgejo.ref_name == 'staging'
|
||||
run: rsync -var -e 'ssh -i id_ed25519' ./public/ deploy@www.berlin.ccc.de:srv/http/www-staging/
|
||||
run: rsync -var -e 'ssh -i .ssh/id_ed25519' ./public/ deploy@www.berlin.ccc.de:srv/http/www-staging/
|
||||
continue-on-error: true
|
||||
- name: Sync rendered site to production
|
||||
if: forgejo.ref_name == 'production'
|
||||
run: rsync -var -e 'ssh -i id_ed25519' ./public/ deploy@www.berlin.ccc.de:srv/http/www/
|
||||
run: rsync -var -e 'ssh -i .ssh/id_ed25519' ./public/ deploy@www.berlin.ccc.de:srv/http/www/
|
||||
continue-on-error: true
|
||||
|
||||
- name: Cleanup
|
||||
run: rm -rf id_ed25519
|
||||
run: rm -rf .ssh
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue