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:
|
jobs:
|
||||||
deploy:
|
deploy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: System checks
|
|
||||||
run: |
|
|
||||||
ip a
|
|
||||||
ip r
|
|
||||||
ip -6 r
|
|
||||||
cat /etc/resolv.conf
|
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: apk --no-cache add hugo python3 py3-pip git
|
run: apk --no-cache add hugo python3 py3-pip git
|
||||||
|
|
||||||
|
|
@ -27,29 +20,33 @@ jobs:
|
||||||
hugo version
|
hugo version
|
||||||
python --version
|
python --version
|
||||||
|
|
||||||
|
- name: Install Python depenndencies
|
||||||
|
run: python -m pip install -r requirements.txt
|
||||||
|
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
run: |
|
run: |
|
||||||
git clone -b ${{ forgejo.ref_name }} https://git.berlin.ccc.de/cccb-website-team/www.git .
|
git clone -b ${{ forgejo.ref_name }} https://git.berlin.ccc.de/cccb-website-team/www.git .
|
||||||
git status
|
git status
|
||||||
exit 1
|
|
||||||
|
|
||||||
- name: Install Python depenndencies
|
|
||||||
run: python -m pip install -r requirements.txt
|
|
||||||
|
|
||||||
- name: Render site
|
- name: Render site
|
||||||
run: ./build.sh
|
run: ./build.sh
|
||||||
|
|
||||||
- name: Setup SSH key
|
- name: Setup SSH key
|
||||||
run: |
|
run: |
|
||||||
echo ${{ secrets.SSH_PRIVATE_KEY }} > id_ed25519
|
mkdir -p .ssh
|
||||||
chmod 600 id_ed25519
|
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
|
- name: Sync rendered site to staging
|
||||||
if: forgejo.ref_name == '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
|
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 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
|
continue-on-error: true
|
||||||
|
|
||||||
- name: Cleanup
|
- name: Cleanup
|
||||||
run: rm -rf id_ed25519
|
run: rm -rf .ssh
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue