add presentation for upcoming diday 2026-05-03 (Die eigene Cloud) #136
3 changed files with 4 additions and 42 deletions
commit
dc9a5363d1
|
|
@ -20,4 +20,4 @@ jobs:
|
||||||
echo "${{ secrets.SSH_KNOWN_HOSTS_FILE }}" > ./known_hosts
|
echo "${{ secrets.SSH_KNOWN_HOSTS_FILE }}" > ./known_hosts
|
||||||
- name: Staging Deployment - Remove PR from staging
|
- name: Staging Deployment - Remove PR from staging
|
||||||
run: |
|
run: |
|
||||||
ssh -i deploykey.priv -o 'UserKnownHostsFile ./known_hosts' ccchh-website-deploy@public-web-static-intern.hamburg.ccc.de -t "rm -r /var/www/staging.hamburg.ccc.de/pr${{ github.event.pull_request.number }}/"
|
ssh -i deploykey.priv -o 'UserKnownHostsFile ./known_hosts' ccchh-website-deploy@public-web-static.hosts.hamburg.ccc.de -t "rm -r /var/www/staging.hamburg.ccc.de/pr${{ github.event.pull_request.number }}/"
|
||||||
|
|
|
||||||
|
|
@ -52,13 +52,13 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
echo "${{ secrets.SSH_DEPLOY_KEY }}" > deploykey.priv
|
echo "${{ secrets.SSH_DEPLOY_KEY }}" > deploykey.priv
|
||||||
chmod 400 deploykey.priv
|
chmod 400 deploykey.priv
|
||||||
echo "${{ secrets.SSH_KNOWN_HOSTS_FILE }}" > ./known_hosts
|
echo "${{ vars.SSH_KNOWN_HOSTS }}" > ./known_hosts
|
||||||
|
|
||||||
- name: Deploy - Upload PR to staging
|
- name: Deploy - Upload PR to staging
|
||||||
if: github.event_name == 'pull_request'
|
if: github.event_name == 'pull_request'
|
||||||
run: |
|
run: |
|
||||||
echo "Deploying to staging.hamburg.ccc.de/pr${{ github.event.pull_request.number }}"
|
echo "Deploying to staging.hamburg.ccc.de/pr${{ github.event.pull_request.number }}"
|
||||||
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/staging.hamburg.ccc.de/pr${{ github.event.pull_request.number }}/
|
rsync -v -r --delete -e "ssh -i deploykey.priv -o 'UserKnownHostsFile ./known_hosts'" public/ ccchh-website-deploy@public-web-static.hosts.hamburg.ccc.de:/var/www/staging.hamburg.ccc.de/pr${{ github.event.pull_request.number }}/
|
||||||
- name: Deploy - Add comment to PR with staging URL
|
- name: Deploy - Add comment to PR with staging URL
|
||||||
if: github.event_name == 'pull_request' && github.event.action == 'opened'
|
if: github.event_name == 'pull_request' && github.event.action == 'opened'
|
||||||
run: |
|
run: |
|
||||||
|
|
@ -72,7 +72,7 @@ jobs:
|
||||||
- name: Deploy - Upload to prod
|
- name: Deploy - Upload to prod
|
||||||
if: (github.event_name == 'push' || github.event_name == 'schedule') && github.ref_name == 'main'
|
if: (github.event_name == 'push' || github.event_name == 'schedule') && github.ref_name == 'main'
|
||||||
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.hosts.hamburg.ccc.de:/var/www/hamburg.ccc.de/
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v3
|
||||||
if: github.event_name == 'pull_request'
|
if: github.event_name == 'pull_request'
|
||||||
|
|
|
||||||
|
|
@ -1,38 +0,0 @@
|
||||||
variables:
|
|
||||||
TZ: Europe/Berlin
|
|
||||||
|
|
||||||
stages:
|
|
||||||
- build
|
|
||||||
- deploy
|
|
||||||
|
|
||||||
build-website:
|
|
||||||
stage: build
|
|
||||||
image: registry.gitlab.com/pages/hugo/hugo_extended:latest
|
|
||||||
before_script:
|
|
||||||
- apk update
|
|
||||||
- apk add tzdata coreutils curl jq git
|
|
||||||
script:
|
|
||||||
- ./fetch-calendar.sh
|
|
||||||
- sed -i "s#baseURL = 'https://hamburg.ccc.de/'#baseURL = 'https://next.hamburg.ccc.de/'#" hugo.toml
|
|
||||||
- hugo
|
|
||||||
artifacts:
|
|
||||||
untracked: true
|
|
||||||
expose_as: "website build"
|
|
||||||
name: "website-build-$CI_COMMIT_REF_NAME-$CI_COMMIT_SHORT_SHA"
|
|
||||||
paths:
|
|
||||||
- public/
|
|
||||||
expire_in: 1 hrs
|
|
||||||
|
|
||||||
deploy-website:
|
|
||||||
stage: deploy
|
|
||||||
image: alpine
|
|
||||||
before_script:
|
|
||||||
- apk update
|
|
||||||
- apk add rsync openssh
|
|
||||||
script:
|
|
||||||
- chmod 400 $NEXT_SSH_DEPLOY_KEY
|
|
||||||
- rsync -r --delete -e "ssh -i $NEXT_SSH_DEPLOY_KEY -o 'UserKnownHostsFile $SSH_KNOWN_HOSTS_FILE'" public/ ccchh-website-deploy@public-web-static-intern.hamburg.ccc.de:/var/www/next.hamburg.ccc.de/
|
|
||||||
rules:
|
|
||||||
- if: $CI_COMMIT_BRANCH == "main"
|
|
||||||
when: on_success
|
|
||||||
- when: never
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue