wip: ci: factor out deployment into separate steps for better org.
All checks were successful
/ pipeline-info (pull_request) Successful in 1s
/ build (pull_request) Successful in 40s
/ deploy-prod (pull_request) Has been skipped
/ deploy-staging (pull_request) Successful in 12s

This commit is contained in:
June 2025-07-26 16:31:32 +02:00
commit 547aee3de3
Signed by: june
SSH key fingerprint: SHA256:o9EAq4Y9N9K0pBQeBTqhSDrND5E7oB+60ZNx0U1yPe0

View file

@ -79,8 +79,55 @@ jobs:
run: | run: |
rsync -v -r --delete -e "ssh -i deploykey.priv -o 'UserKnownHostsFile ./known_hosts'" public/ ccchh-website-deploy@public-web-static-intern.hamburg.ccc.de:/var/www/hamburg.ccc.de/ rsync -v -r --delete -e "ssh -i deploykey.priv -o 'UserKnownHostsFile ./known_hosts'" public/ ccchh-website-deploy@public-web-static-intern.hamburg.ccc.de:/var/www/hamburg.ccc.de/
- uses: actions/upload-artifact@v3 - name: Upload the website build as an artifact
if: github.event_name == 'pull_request' uses: actions/upload-artifact@v3
with: with:
name: website-build name: website-build
path: public/ path: public/
deploy-prod:
if: (github.event_name == 'push' || github.event_name == 'schedule') && github.ref_name == 'main'
needs:
- build
runs-on: docker
container:
image: code.forgejo.org/oci/node:22-bookworm
steps:
- name: Download the website build artifact
uses: actions/download-artifact@v3
with:
name: website-build
path: website-build
- name: Install packages
run: |
apt update
# For uploading.
apt install -y rsync
- name: debugging
run: |
ls -la
echo "website-build:"
ls -la website-build
deploy-staging:
if: github.event_name == 'pull_request'
needs:
- build
runs-on: docker
container:
image: code.forgejo.org/oci/node:22-bookworm
steps:
- name: Download the website build artifact
uses: actions/download-artifact@v3
with:
name: website-build
path: website-build
- name: Install packages
run: |
apt update
# For uploading.
apt install -y rsync