diff --git a/.github/workflows/latest.yaml b/.github/workflows/latest.yaml new file mode 100644 index 0000000..ceabeb3 --- /dev/null +++ b/.github/workflows/latest.yaml @@ -0,0 +1,33 @@ +name: GHCR Latest + +on: + push: + branches: + - main + +jobs: + build-and-push: + runs-on: ubuntu-latest + + steps: + - name: Check out the repo + uses: actions/checkout@v2 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + + - name: Log in to GitHub Container Registry + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and push + uses: docker/build-push-action@v2 + with: + push: true + tags: ghcr.io/${{ github.repository }}:build-${{github.run_number}} + + - name: Image digest + run: echo ${{ steps.build-and-push.outputs.digest }} diff --git a/Dockerfile b/Dockerfile index 5bb2703..afea56c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,15 +1,27 @@ -FROM jekyll/jekyll:builder +# STAGE: Builder +FROM jekyll/jekyll:builder as builder + +WORKDIR /cfhn + +COPY . /cfhn/ + +RUN chmod -R 777 /cfhn RUN gem install public_suffix +# RUN gem install jekyll +# RUN gem install jekyll-seo-tag +# RUN gem install jekyll-sitemap +# RUN gem install jekyll-redirect-from +# RUN gem install jekyll-feed +# RUN gem install tzinfo-data +# RUN gem install bundler +RUN bash -c "bundle install" +RUN bash -c "bundle exec jekyll build" -# RUN apt update -y && \ -# apt install -y software-properties-common && \ -# apt-add-repository ppa:brightbox/ruby-ng && \ -# apt update -y && \ -# apt install -y ruby2.7 ruby2.7-dev build-essential autoconf libcurl3-gnutls libcurl3-nss && \ -# gem install -f ffi && \ -# gem install jekyll bundler -# RUN bundle config --global silence_root_warning 1 -WORKDIR /cfhn -CMD ["bash", "-c", "bundle install && bundle exec jekyll serve --host 0.0.0.0"] + + +# STAGE: Production + +FROM nginx:alpine as production +COPY --from=builder /cfhn/_site/ /usr/share/nginx/html/ diff --git a/Dockerfile.develop b/Dockerfile.develop new file mode 100644 index 0000000..5bb2703 --- /dev/null +++ b/Dockerfile.develop @@ -0,0 +1,15 @@ +FROM jekyll/jekyll:builder + +RUN gem install public_suffix + + +# RUN apt update -y && \ +# apt install -y software-properties-common && \ +# apt-add-repository ppa:brightbox/ruby-ng && \ +# apt update -y && \ +# apt install -y ruby2.7 ruby2.7-dev build-essential autoconf libcurl3-gnutls libcurl3-nss && \ +# gem install -f ffi && \ +# gem install jekyll bundler +# RUN bundle config --global silence_root_warning 1 +WORKDIR /cfhn +CMD ["bash", "-c", "bundle install && bundle exec jekyll serve --host 0.0.0.0"] diff --git a/README.md b/README.md index 500bc55..6d79852 100644 --- a/README.md +++ b/README.md @@ -1,42 +1,30 @@ # codeforheilbronn-de -## Wie kann ich beitragen? +This repository contains the source code for the website of Code for Heilbronn e.V. (https://codeforheilbronn.de). -### Blogbeitrag schreiben +## How to support? -Um einen neuen Blogbeitrag zu schreiben, lege dir zuerst einen neuen Branch an. Das Namensschema für Blogbeiträge ist "blog/[year]-[month]-[day]-[title] +### Writing a blog post -Der neue Blogbeitrag wird dann als neue Markdown-File unter '\_posts' abgelegt. -Wenn du Bilder etc in deinen Beitrag einbinden möchtest, kannst du diese unter 'uploads/post_media' ablegen. Bei einzelnen Bildern, kannst du das Bild direkt in den Ordner legen. Wenn du mehrere Bilder hast, lege bitte einen neuen Ordner an und nenne ihn genau wie die Markdown-Datei (nur ohne .md). +To write a new blog post, first create a new branch. The naming scheme for blog posts is "blog/[year]-[month]-[day]-[title] -### Projekt veröffentlichen +Create a new file under '\_posts' with the following naming scheme: [year]-[month]-[day]-[title].md -Wenn du ein Projekt auf der Website veröffentlichen willst, dann lege dir zuerst einen neuen Branch an. Das Namensschema für Projekte ist "project/[year]-[month]-[day]-[title] -Lege dir, für dein Projekt, einen neuen Eintrag unter '\_projects' an. Die Bilder für Projekte werden in 'uploads/\_prj_media' abgelegt. Das Vorgehen ist wie bei Blogeinträgen. +If you want to include images etc in your post, you can put them under 'uploads/post_media'. For individual images, you can put the image directly into the folder. If you have multiple images, please create a new folder and name it exactly like the markdown file (without .md). -### Änderungen am Layout / allgemeine neue Features +### Publishing a project -Das Namensschema für neue Features ist "feature/[title] +If you want to publish a project on the website, first create a new branch. The naming scheme for projects is "project/[year]-[month]-[day]-[title] +Create a new file under '\_projects' with the following naming scheme: [year]-[month]-[day]-[title].md +Images for projects are stored in 'uploads/\_prj_media'. The procedure is the same as for blog posts. +### Changing the layout / general new features -## Getting Started -If ruby and the gem bundler is installed, run `bundle install` to install all further dependencies - -To host the site locally run `bundle exec jekyll serve` +If you want to change the layout or add new features, please create a new branch. The naming scheme for new features is "feature/[title] -## JekyllWorkshop - sudo apt-add-repository ppa:brightbox/ruby-ng - sudo apt update - sudo apt install ruby2.5 ruby2.5-dev build-essential autoconf libcurl3 - sudo gem install -f ffi - sudo gem install jekyll bundler - git clone https://github.com/opendata-heilbronn/codeforheilbronn-de - cd codeforheilbronn-de - bundle install - bundle exec jekyll serve +## Getting Started -oder alternativ mit Docker +hosting a local development server, just use the following command: - docker build -t cfhn/cfhn-dev . - docker run -v $PWD:/cfhn -p 4000:4000 cfhn/cfhn-dev \ No newline at end of file + docker-compose up diff --git a/_layouts/default.html b/_layouts/default.html index ab45490..a80abb1 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -4,6 +4,8 @@ + + {% if page.indexing == false %} diff --git a/_posts/2024-03-02-odd24.md b/_posts/2024-02-14-odd24.md similarity index 98% rename from _posts/2024-03-02-odd24.md rename to _posts/2024-02-14-odd24.md index 92cefd1..deb86b8 100644 --- a/_posts/2024-03-02-odd24.md +++ b/_posts/2024-02-14-odd24.md @@ -6,10 +6,10 @@ tags: [hackathon] feature_image: /uploads/post_media/open-data-day-header-online.jpg published: true category: Einladung -registration: https://pretix.cfhn.it/cfhn/odd24/ -date: 2023-02-24 +date: 2024-02-14 excerpt: "Der Open Data Day ist ein weltweites Festival für Offene Daten. Wir veranstalten am 2. und 3. März hierzu einen Hackathon." author: joni +# registration: https://pretix.cfhn.it/cfhn/odd24/ --- (English Version down below) diff --git a/docker-compose.yml b/docker-compose.yml index 849c3dc..03b233d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,7 +3,10 @@ version: '3.8' services: jekyll_dev: # image: jekyll/jekyll:builder - build: . + build: + context: . + dockerfile: Dockerfile.develop + volumes: - ./:/cfhn ports: diff --git a/uploads/post_media/open-data-day-header-online.jpg b/uploads/post_media/open-data-day-header-online.jpg index 94c6ccb..b09202c 100644 Binary files a/uploads/post_media/open-data-day-header-online.jpg and b/uploads/post_media/open-data-day-header-online.jpg differ