Skip to content

Commit

Permalink
Use Roq (#38)
Browse files Browse the repository at this point in the history
* Use Roq

* Create static.yml

* Fix css

* Fix menu
  • Loading branch information
ia3andy authored Nov 9, 2024
1 parent ebb6d6b commit 8045c26
Show file tree
Hide file tree
Showing 70 changed files with 2,066 additions and 785 deletions.
5 changes: 5 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*
!target/*-runner
!target/*-runner.jar
!target/lib/*
!target/quarkus-app/*
65 changes: 65 additions & 0 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
## Deploy to GH-Pages for your Quarkus Roq blog.
name: Quarkus Roq Deploy CI

on:
push:
branches: [ master ]
workflow_dispatch:

env:
QUARKUS_ROQ_GENERATOR_BATCH: true

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: 21
distribution: 'temurin'
cache: 'maven'
- name: Get GitHub Pages URL
id: get_url
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
url=$(gh api "repos/$GITHUB_REPOSITORY/pages" --jq '.html_url');echo "ghp-url=$url";
path=$(echo "$url" | sed -E 's|https?://[^/]+(/.*)?|\1|')
url=$(echo "$url" | sed -E 's|(https?://[^/]+).*|\1|')
if [ -z "$path" ]; then
path="/"
fi
echo "SITE_URL=$url"; echo "SITE_URL=$url" >> $GITHUB_ENV;
echo "SITE_PATH=$path"; echo "SITE_PATH=$path" >> $GITHUB_ENV;
- name: Build & Generate Blog
run: mvn -B package quarkus:run -DskipTests -Dquarkus.http.root-path=$SITE_PATH -Dsite.url=$SITE_URL
- name: Upload site as artifact
uses: actions/upload-artifact@v4
with:
name: site
path: target/roq
retention-days: 1
deploy:
runs-on: ubuntu-latest
needs: build
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Download Built site
uses: actions/download-artifact@v4
with:
name: site
path: _site
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
47 changes: 41 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,45 @@
output
sources
ide
target
#Maven
target/
pom.xml.tag
pom.xml.releaseBackup
pom.xml.versionsBackup
release.properties
*.versionsBackup
*.releaseBackup
.flattened-pom.xml

# Eclipse
.project
.classpath
.settings/
bin/

# IntelliJ
.idea
*.ipr
*.iml
*.iws

# NetBeans
nb-configuration.xml

# Visual Studio Code
.vscode
.factorypath

# OSX
.DS_Store

# Vim
*.swp
*.swo

# patch
*.orig
*.rej

# Local environment
.env

# Plugin directory
/.quarkus/cli/plugins/
# TLS Certificates
.certs/
1 change: 1 addition & 0 deletions .mvn/wrapper/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
maven-wrapper.jar
93 changes: 93 additions & 0 deletions .mvn/wrapper/MavenWrapperDownloader.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

import java.io.IOException;
import java.io.InputStream;
import java.net.Authenticator;
import java.net.PasswordAuthentication;
import java.net.URI;
import java.net.URL;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.nio.file.StandardCopyOption;
import java.util.concurrent.ThreadLocalRandom;

public final class MavenWrapperDownloader {
private static final String WRAPPER_VERSION = "3.3.2";

private static final boolean VERBOSE = Boolean.parseBoolean(System.getenv("MVNW_VERBOSE"));

public static void main(String[] args) {
log("Apache Maven Wrapper Downloader " + WRAPPER_VERSION);

if (args.length != 2) {
System.err.println(" - ERROR wrapperUrl or wrapperJarPath parameter missing");
System.exit(1);
}

try {
log(" - Downloader started");
final URL wrapperUrl = URI.create(args[0]).toURL();
final String jarPath = args[1].replace("..", ""); // Sanitize path
final Path wrapperJarPath = Paths.get(jarPath).toAbsolutePath().normalize();
downloadFileFromURL(wrapperUrl, wrapperJarPath);
log("Done");
} catch (IOException e) {
System.err.println("- Error downloading: " + e.getMessage());
if (VERBOSE) {
e.printStackTrace();
}
System.exit(1);
}
}

private static void downloadFileFromURL(URL wrapperUrl, Path wrapperJarPath)
throws IOException {
log(" - Downloading to: " + wrapperJarPath);
if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) {
final String username = System.getenv("MVNW_USERNAME");
final char[] password = System.getenv("MVNW_PASSWORD").toCharArray();
Authenticator.setDefault(new Authenticator() {
@Override
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(username, password);
}
});
}
Path temp = wrapperJarPath
.getParent()
.resolve(wrapperJarPath.getFileName() + "."
+ Long.toUnsignedString(ThreadLocalRandom.current().nextLong()) + ".tmp");
try (InputStream inStream = wrapperUrl.openStream()) {
Files.copy(inStream, temp, StandardCopyOption.REPLACE_EXISTING);
Files.move(temp, wrapperJarPath, StandardCopyOption.REPLACE_EXISTING);
} finally {
Files.deleteIfExists(temp);
}
log(" - Downloader complete");
}

private static void log(String msg) {
if (VERBOSE) {
System.out.println(msg);
}
}

}
20 changes: 20 additions & 0 deletions .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
wrapperVersion=3.3.2
distributionType=source
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.3.2/maven-wrapper-3.3.2.jar
1 change: 0 additions & 1 deletion CNAME

This file was deleted.

13 changes: 13 additions & 0 deletions content/404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
layout: default
image: logo.png
body-class: page-404
---

<div class="main">
<h1>Roq! Where's my page?</h1>
{#if page.image}
<img class="page-image" src="{page.image}" alt="{page.title}">
{/}
<p><b>Roq</b>: If you are lost, find yourself <a href="{site.url}">here</a>.</p>
</div>
29 changes: 29 additions & 0 deletions content/archives.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
title: Archives
id: archives
description: Le Mars JUG réunit régulièrement la communauté Java de Marseille et de sa région autour d'intervenants qui viennent nous parler de la plateforme Java et de son écosystème.
layout: main
---
<div class="row">
<div class="span12">
<h2 class="reunions-section-title">Archives</h2>
{#for saison in cdi:archive-reunions.list}
<h4 class="reunions-subsection-title">Saison {saison.year}</h4>
<ul>
{#for reunion in saison.reunions}
<li>
<i>
{reunion.title}&nbsp;par
{#for speaker in reunion.speakers}
<strong>{#if speaker.profile}<a href="{speaker.profile}"
target="_blank">{speaker.name}</a>{#else}{speaker.name}{/if}
</strong>{#if !speaker_isLast} et {#else},{/if}
{/for}
{reunion.localDate.format(FULL_DATE_FORMAT)}
</i>
</li>
{/for}
</ul>
{/for}
</div>
</div>
56 changes: 56 additions & 0 deletions content/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
---
title: Marseille Java User Group
id: home
description: Le Mars JUG réunit régulièrement la communauté Java de Marseille et de sa région autour d'intervenants qui viennent nous parler de la plateforme Java et de son écosystème.
image: logo.png
layout: main
---


<div class="span12">

<div class="hero-unit">
<div class="center">
<h2>{page.title}</h2>
</div>
<p>{page.description}</p>
<div class="center">
<img src="{site.image('logo-smaller.png')}" alt="logo"/>
</div>
</div>
<div class="row">


<div class="span12">
{#include partials/upcoming /}
</div>
</div>
<footer class="row">
<div class="span4">
<h3>Notre communaut&eacute;</h3>
<address>
<i class="icon-group"></i> <strong>Groupe:</strong> <a href="http://groups.google.com/group/marsjug">[email protected]</a><br/>
<i class="icon-twitter"></i> <strong>Twitter:</strong> <a
href="http://twitter.com/#!/marsjug">@marsjug</a><br/>
<i class="icon-star"></i> <strong>Meetup:</strong> <a
href="http://www.meetup.com/Marseille-Java-User-Group-Meetup/">marsjug</a><br/>
<i class="icon-envelope"></i> <strong>Mail:</strong> <a
href="[email protected]">[email protected]</a><br/>
</address>
</div>

<div class="span3 offset4">
<h3>Partenaires</h3>
<div class="row">
<div class="span3">
<a href="https://tricentis.wd1.myworkdayjobs.com/Tricentis_Careers?locations=0cb2ae6f158901dc29c91826a601ae02"
target="_blank"><img src="{site.image('tricentis.png')}"/></a>
</div>
</div>
</div>


</footer>

</div>

13 changes: 13 additions & 0 deletions content/partenaires.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
title: Partenaires
id: partenaires
description: Le Mars JUG réunit régulièrement la communauté Java de Marseille et de sa région autour d'intervenants qui viennent nous parler de la plateforme Java et de son écosystème.
layout: main
---

{#for partenaire in cdi:partenaires.list}
<div class="span4">
<h3>{partenaire.name}</h3>
<p><a href="{partenaire.url}" target="_blank"><img src="{site.image('partenaires').resolve(partenaire.image)}"/></a></p>
</div>
{/}
24 changes: 24 additions & 0 deletions content/reunions.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
title: Soirées
id: reunions
description: Le Mars JUG réunit régulièrement la communauté Java de Marseille et de sa région autour d'intervenants qui viennent nous parler de la plateforme Java et de son écosystème.
layout: main
---

<div class="row">
<div class="span12">
{#include partials/upcoming/}
</div>
</div>


<div class="row">
<div class="span12">
<h2 class="reunions-section-title">Pr&eacute;c&eacute;dentes soirées</h2>
<div class="reunions">
{#for reunion in site.collections.reunions.past}
{#reunion-card reunion=reunion/}
{/for}
</div>
</div>
</div>
Loading

0 comments on commit 8045c26

Please sign in to comment.