design/.forgejo/workflows/deploy.yaml
2025-02-12 18:43:02 +01:00

34 lines
1 KiB
YAML

on:
push:
branches:
- main
- add_ci
jobs:
build:
runs-on: docker
container:
image: docker.io/library/alpine
steps:
- name: Pipeline info
run: |
echo "Run triggered by ${{ github.event_name }} (${{ github.event.action }}) on ref ${{ github.ref_name }}"
- name: Install packages
run: |
apk update
# For uploading.
apk add rsync openssh
- uses: actions/checkout@v4
- name: Prepare keys
run: |
echo "${{ secrets.SSH_DEPLOY_KEY }}" > deploykey.priv
chmod 400 deploykey.priv
echo "${{ secrets.SSH_KNOWN_HOSTS_FILE }}" > ./known_hosts
- name: Upload styleguide
if: (github.event_name == 'push' || github.event_name == 'schedule') && github.ref_name == 'main'
run: |
rsync -v -r --delete -e "ssh -i deploykey.priv -o 'UserKnownHostsFile ./known_hosts'" styleguide/ eh22-styleguide-deploy@eh22-wiki-intern.hamburg.ccc.de:/var/www/eh22-styleguide/