setup deployment pipeline

master
B Kleinen 3 years ago
parent 570afa1bf4
commit 1a568afd45

@ -1,8 +1,32 @@
kind: pipeline kind: pipeline
type: kubernetes type: kubernetes
name: hugoweb name: Hugo Only
steps: steps:
- name: submodules
image: bitnami/git:latest
commands:
- git submodule update --init --recursive
- name: hugo
image: plugins/hugo
settings:
validate: true
hugo_version: 0.88.1
extended: true
trigger:
branch:
- master
---
kind: pipeline
type: kubernetes
name: Deploy
steps:
- name: submodules - name: submodules
image: bitnami/git:latest image: bitnami/git:latest
commands: commands:
@ -29,3 +53,7 @@ steps:
secrets: [rsync_key] secrets: [rsync_key]
key: key:
from_secret: rsync_key from_secret: rsync_key
trigger:
ref:
- refs/tags/v*

@ -0,0 +1,24 @@
name: Deploy Production
on:
push:
tags:
- 'v*'
#on:
# release:
# types: [published]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # needs to be complete for later push
ref: master
- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: echo tag
run: echo "---- about to deploy tag ${RELEASE_VERSION}"
- name: Push to Production Repo
run: |
git push https://${{ secrets.P_USER }}:${{ secrets.P_PASSWD }}@${{ secrets.P_URL }} master ${RELEASE_VERSION}

@ -1,19 +1,19 @@
name: github pages name: Deploy Staging
on: on:
push: push:
branches: branches:
- master # Set a branch to deploy - master # Set a branch to deploy
pull_request: tags-ignore:
- 'v*'
jobs: jobs:
deploy: deploy:
runs-on: ubuntu-20.04 runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
with: with:
submodules: true # Fetch Hugo themes (true OR recursive) submodules: true # Fetch Hugo themes (true OR recursive)
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
- name: Setup Hugo - name: Setup Hugo
uses: peaceiris/actions-hugo@v2 uses: peaceiris/actions-hugo@v2
@ -21,10 +21,10 @@ jobs:
hugo-version: 'latest' hugo-version: 'latest'
extended: true extended: true
- name: Build - name: Build Hugo Site
run: hugo --minify -e staging run: hugo --minify -e staging
- name: Deploy - name: Deploy to Staging on Github Pages
uses: peaceiris/actions-gh-pages@v3 uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/master' if: github.ref == 'refs/heads/master'
with: with:

@ -1,5 +1,7 @@
# About the SEUH 2022 Website # About the SEUH 2022 Website
This is the source code for the [SEUH 2022 Website.](https://seuh.org/seuh2022/)
This website was built with the static site generator [Hugo](https://gohugo.io/). This website was built with the static site generator [Hugo](https://gohugo.io/).
## Development: ## Development:
@ -14,19 +16,8 @@ cd and start the server with:
And then view the generated site here: http://localhost:1313/seuh2022 And then view the generated site here: http://localhost:1313/seuh2022
One liner for start & open: Have a look at the makefile for useful commands.
open http://localhost:1313/seuh2022 ; hugo -D -p 1313 server
## Theme
The SEUH 2022 Website is based on the
[Hero Hugo Theme](https://themes.gohugo.io/themes/hugo-hero-theme/), on GitHub:
[zerostaticthemes/hugo-hero-theme: A multi-page Hugo theme with fullscreen hero images and fullwidth sections.](https://github.com/zerostaticthemes/hugo-hero-theme)
Based on a fork in [seuh2022/hugo-hero-theme](https://github.com/seuh2022/hugo-hero-theme), after
reading this article:
[Using git submodule for Hugo themes - Don't Panic](https://www.andrewhoog.com/post/git-submodule-for-hugo-themes/)
## Structure ## Structure
@ -35,15 +26,23 @@ reading this article:
| - About + Sponsoren | - Programm | - CFP | - Maillingliste | | - About + Sponsoren | - Programm | - CFP | - Maillingliste |
| - Geschichte | - Tagungsband | - Registration | - Local Orga | | - Geschichte | - Tagungsband | - Registration | - Local Orga |
## Deployment Pipeline
- [Staging Environment](https://seuh2022.github.io/seuh2022-website)
## Credits ## Credits
### Icons
The free icons are from B[ootstrap-Icons](https://icons.getbootstrap.com/). The free icons are from B[ootstrap-Icons](https://icons.getbootstrap.com/).
The Berlin fotos are from ### Theme
The SEUH 2022 Website is based on the
[Hero Hugo Theme](https://themes.gohugo.io/themes/hugo-hero-theme/), on GitHub:
[zerostaticthemes/hugo-hero-theme: A multi-page Hugo theme with fullscreen hero images and fullwidth sections.](https://github.com/zerostaticthemes/hugo-hero-theme)
Photo by <a href="https://unsplash.com/@vradenburg?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Adam Vradenburg</a> on <a href="https://unsplash.com/s/photos/berlin?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Unsplash</a> ### Photos
and
Photo by <a href="https://unsplash.com/@pieronigro?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Piero Nigro</a> on <a href="https://unsplash.com/?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Unsplash</a>
The HTW Beach Bar Photo is by Nikolas Fahlbusch. see the[ Photo credits site](https://www.seuh.org/seuh2022/about/).

@ -13,4 +13,4 @@ icon: "icons/calendar3.svg"
| 15. Oktober 2021 | &nbsp;&nbsp; | Einreichung von Beiträgen | | 15. Oktober 2021 | &nbsp;&nbsp; | Einreichung von Beiträgen |
| 1. Dezember 2021 | | Nachricht über die Annahme | | 1. Dezember 2021 | | Nachricht über die Annahme |
| 31. Dezember 2021 | | Einreichung der Endbeiträge | | 31. Dezember 2021 | | Einreichung der Endbeiträge |
| 24./25. Februar 2022 | | SEUH | | 24./25. Februar 2022 | | SEUH 2022 |

@ -1,13 +1,13 @@
push: push:
git submodule foreach --recursive 'git push' git submodule foreach --recursive 'git push'
git push git push origin master
hugo: hugo:
open http://localhost:1313/seuh2022 open http://localhost:1313/seuh2022
hugo -D -p 1313 server hugo -D -p 1313 server
github: staging:
open http://localhost:1414/seuh2022-website open http://localhost:1414/seuh2022-website
hugo --baseURL=http://localhost:1414/seuh2022-website/ -p 1414 -e staging server hugo --baseURL=http://localhost:1414/seuh2022-website/ -p 1414 -e staging server
stuttgart: production:
open http://localhost:1515/seuh2022/ open http://localhost:1515/seuh2022/
hugo --baseURL=http://localhost:1515/seuh2022/ -p 1515 -e production server hugo --baseURL=http://localhost:1515/seuh2022/ -p 1515 -e production server
build_production: build_production:
@ -18,3 +18,21 @@ update_theme:
git submodule update --init --recursive git submodule update --init --recursive
deploy: deploy:
git push production master git push production master
pages:
open https://webgit.k8s.sqa.ddnss.org/snowball/hugo-test
open https://drone.k8s.sqa.ddnss.org/snowball/hugo-test/
open https://github.com/seuh2022/seuh2022-website
open https://seuh.org/seuh2022
# make check f=gh-tag.yml
check:
ruby -ryaml -e "puts YAML.load(STDIN.read).inspect" < .github/workflows/$(f)
actions:
open https://github.com/seuh2022/seuh2022-website/actions
# make tag t="t5"
tag:
echo "create and push tag $(t)"
git tag $(t)
git submodule foreach --recursive 'git push'
git push origin master $(t)
#git push origin $(t)
open https://github.com/seuh2022/seuh2022-website/actions

Loading…
Cancel
Save