Skip to content

Commit

Permalink
refactor: upgrade to latest
Browse files Browse the repository at this point in the history
  • Loading branch information
aoudiamoncef committed Nov 8, 2023
1 parent 056eda2 commit b7db3bc
Show file tree
Hide file tree
Showing 10 changed files with 50 additions and 48 deletions.
23 changes: 11 additions & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ on:
jobs:
build:
environment: staging
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
env:
NODE_ENV: ${{ secrets.NODE_ENV}}
NODE_ENV: ${{ vars.NODE_ENV }}
steps:
- uses: actions/checkout@v2
with:
Expand All @@ -26,34 +26,33 @@ jobs:
hugo-version: ${{ secrets.HUGO_VERSION }}
extended: true
env:
HUGO_GOOGLEANALYTICS: ${{ secrets.GOOGLE_ANALYTICS_PROPERTY_ID}}
HUGO_BASEURL: ${{ secrets.HUGO_BASE_URL}}
HUGOxPARAMSxALGOLIA_APPID: ${{ secrets.ALGOLIA_APP_ID }}
HUGO_GOOGLEANALYTICS: ${{ secrets.HUGO_GOOGLE }}
HUGOxPARAMSxALGOLIA_APPID: ${{ secrets.HUGOXPARAMSXALGOLIA_APPID }}
HUGOxPARAMSxALGOLIA_APIKEY: ${{ secrets.ALGOLIA_SEARCH_API_KEY }}
HUGOxPARAMSxALGOLIA_INDEXNAME: ${{ secrets.ALGOLIA_INDEX_NAME }}
HUGOxPARAMSxALGOLIA_INDEXNAME: ${{ secrets.HUGOXPARAMSXALGOLIA_INDEXNAME }}

- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ secrets.RUBY_VERSION}}
ruby-version: ${{ vars.RUBY_VERSION }}
- run: gem install asciidoctor asciidoctor-html5s asciidoctor-rouge

- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: ${{ secrets.NODE_VERSION}}
node-version: ${{ vars.NODE_VERSION }}
- run: npm install

- name: Run Hugo
run: |
hugo --minify --buildDrafts --buildExpired --buildFuture --path-warnings --i18n-warnings --templateMetrics --templateMetricsHints --verbose --verboseLog
hugo ${{ vars.HUGO_ARGS }}
cd scripts/
./sw.sh
- name: Upload Hugo Algolia Index
uses: aoudiamoncef/hugo-algolia-uploader@main
with:
app_id: ${{ secrets.ALGOLIA_APP_ID }}
admin_key: ${{ secrets.ALGOLIA_ADMIN_API_KEY }}
index_name: ${{ secrets.ALGOLIA_INDEX_NAME }}
app_id: ${{ secrets.HUGOXPARAMSXALGOLIA_APPID }}
admin_key: ${{ secrets.HUGOXPARAMSXALGOLIA_APIKEY }}
index_name: ${{ secrets.HUGOXPARAMSXALGOLIA_INDEXNAME }}
index_languages: en,fr
23 changes: 11 additions & 12 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ on:
jobs:
deploy:
environment: production
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
env:
NODE_ENV: ${{ secrets.NODE_ENV}}
NODE_ENV: ${{ vars.NODE_ENV}}
steps:
- uses: actions/checkout@v2
with:
Expand All @@ -23,37 +23,36 @@ jobs:
hugo-version: ${{ secrets.HUGO_VERSION }}
extended: true
env:
HUGO_GOOGLEANALYTICS: ${{ secrets.GOOGLE_ANALYTICS_PROPERTY_ID}}
HUGO_BASEURL: ${{ secrets.HUGO_BASE_URL}}
HUGOxPARAMSxALGOLIA_APPID: ${{ secrets.ALGOLIA_APP_ID }}
HUGO_GOOGLEANALYTICS: ${{ secrets.HUGO_GOOGLE}}
HUGOxPARAMSxALGOLIA_APPID: ${{ secrets.HUGOXPARAMSXALGOLIA_APPID }}
HUGOxPARAMSxALGOLIA_APIKEY: ${{ secrets.ALGOLIA_SEARCH_API_KEY }}
HUGOxPARAMSxALGOLIA_INDEXNAME: ${{ secrets.ALGOLIA_INDEX_NAME }}
HUGOxPARAMSxALGOLIA_INDEXNAME: ${{ secrets.HUGOXPARAMSXALGOLIA_INDEXNAME }}

- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ secrets.RUBY_VERSION}}
ruby-version: ${{ vars.RUBY_VERSION }}
- run: gem install asciidoctor asciidoctor-html5s asciidoctor-rouge

- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: ${{ secrets.NODE_VERSION}}
node-version: ${{ vars.NODE_VERSION }}
- run: npm install

- name: Run Hugo
run: |
hugo --minify
hugo ${{ vars.HUGO_ARGS }}
cd scripts/
./sw.sh
- name: Upload Hugo Algolia Index
uses: aoudiamoncef/hugo-algolia-uploader@main
with:
app_id: ${{ secrets.ALGOLIA_APP_ID }}
admin_key: ${{ secrets.ALGOLIA_ADMIN_API_KEY }}
index_name: ${{ secrets.ALGOLIA_INDEX_NAME }}
app_id: ${{ secrets.HUGOXPARAMSXALGOLIA_APPID }}
admin_key: ${{ secrets.HUGOXPARAMSXALGOLIA_APIKEY }}
index_name: ${{ secrets.HUGOXPARAMSXALGOLIA_INDEXNAME }}
index_languages: en,fr

- name: Deploy
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/link_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ on:

jobs:
asciidoc-link-check:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: ${{ secrets.NODE_VERSION}}
node-version: ${{ vars.NODE_VERSION}}
- run: npm install -g asciidoc-link-check
- run: find . -name \*.adoc -exec asciidoc-link-check -c .github/workflows/config/config.json --progress {} \;
2 changes: 1 addition & 1 deletion README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ NOTE: To manually upload `index.json` content to https://www.algolia.com/[Algoli

[source,shell]
----
git clone https://github.com/aoudiamoncef/maoudia.com.git
git clone https://github.com/maoudia/www.maoudia.com.git
git submodule update --init --recursive
----

Expand Down
2 changes: 1 addition & 1 deletion config/_default/params.toml
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ copyrightUrl = "https://creativecommons.org/licenses/by-sa/4.0"
creditsText = "Bilberry Hugo Theme"
creditsUrl = "https://github.com/Lednerb/bilberry-hugo-theme"

sourceCodetUrl = "https://github.com/aoudiamoncef/maoudia.com"
sourceCodetUrl = "https://github.com/maoudia/www.maoudia.com"
showComments = true

# Enable / Disable Giscus comments
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,14 @@ The application will read the address documents, add the product and save the en

=== Requirements

* Java 1.8+
* Maven 3+
* Docker Compose
* MongoDB Database Tools
* link:https://adoptium.net/[`OpenJDK 21.0.x`]
* link:https://maven.apache.org/[`Maven 3.9.x`]
* link:https://docs.docker.com/compose/[`Docker Compose 2.23.x`]
* link:https://www.mongodb.com/try/download/database-tools[`MongoDB Database Tools 100.9.x`]

=== Generation

We generate the project skeleton from https://start.spring.io/#!type=maven-project&language=java&platformVersion=2.7.0&packaging=jar&jvmVersion=1.8&groupId=com.maoudia&artifactId=bulk-update-with-spring-data-mongodb&name=Bulk%20Update%20with%20Spring%20Data%20MongoDB%20Reactive&description=Bulk%20Update%20with%20Spring%20data%20MongoDB%20reactive&packageName=com.maoudia.tutorial&dependencies=data-mongodb-reactive,webflux,testcontainers[`Spring Initializr`, window=\"_blank\"].
We generate the project skeleton from https://start.spring.io/#!type=maven-project&language=java&platformVersion=3.1.5&packaging=jar&jvmVersion=21&groupId=com.maoudia&artifactId=bulk-update-with-spring-data-mongodb&name=Bulk%20Update%20with%20Spring%20Data%20MongoDB%20Reactive&description=Bulk%20Update%20with%20Spring%20data%20MongoDB%20reactive&packageName=com.maoudia.tutorial&dependencies=data-mongodb-reactive,webflux,testcontainers[`Spring Initializr`, window=\"_blank\"].

=== Structure

Expand Down Expand Up @@ -133,7 +133,7 @@ We use `docker-compose` to create the needed containers for this tutorial.
services:
mongodb: // <1>
container_name: maoudia-mongodb
image: mongo:5.0.8
image: mongo:7.0.2
environment:
- MONGO_INITDB_DATABASE=test
- MONGO_INITDB_ROOT_USERNAME=admin
Expand All @@ -147,7 +147,7 @@ services:
mongo-express: // <2>
container_name: maoudia-mongo-express
image: mongo-express:0.54.0
image: mongo-express:1.0.0
depends_on:
- mongodb
networks:
Expand All @@ -156,6 +156,8 @@ services:
- ME_CONFIG_MONGODB_SERVER=maoudia-mongodb
- ME_CONFIG_MONGODB_ADMINUSERNAME=admin
- ME_CONFIG_MONGODB_ADMINPASSWORD=password
- ME_CONFIG_BASICAUTH_USERNAME=admin
- ME_CONFIG_BASICAUTH_PASSWORD=password
ports:
- 1515:8081
volumes:
Expand Down Expand Up @@ -223,7 +225,7 @@ Import address collection :
mongoimport --uri "mongodb://admin:password@localhost:15015" --authenticationDatabase=admin --db test --collection address ./data/mongodb/address.ndjson
----

Ou :
Or:

We use *MongoExpress* which is available at http://localhost:1515[`http://localhost:1515`].

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,14 @@ L'application va lire les documents adresse, ajouter le produit et sauvegarder l

=== Prérequis

* Java 1.8+
* Maven 3+
* Docker Compose
* MongoDB Database Tools
* link:https://adoptium.net/[`OpenJDK 21.0.x`]
* link:https://maven.apache.org/[`Maven 3.9.x`]
* link:https://docs.docker.com/compose/[`Docker Compose 2.23.x`]
* link:https://www.mongodb.com/try/download/database-tools[`MongoDB Database Tools 100.9.x`]

=== Génération

On génère le squelette du projet depuis https://start.spring.io/#!type=maven-project&language=java&platformVersion=2.7.0&packaging=jar&jvmVersion=1.8&groupId=com.maoudia&artifactId=bulk-update-with-spring-data-mongodb&name=Bulk%20Update%20with%20Spring%20Data%20MongoDB%20Reactive&description=Bulk%20Update%20with%20Spring%20data%20MongoDB%20reactive&packageName=com.maoudia.tutorial&dependencies=data-mongodb-reactive,webflux,testcontainers[`Spring Initializr`, window=\"_blank\"].
On génère le squelette du projet depuis https://start.spring.io/#!type=maven-project&language=java&platformVersion=3.1.5&packaging=jar&jvmVersion=21&groupId=com.maoudia&artifactId=bulk-update-with-spring-data-mongodb&name=Bulk%20Update%20with%20Spring%20Data%20MongoDB%20Reactive&description=Bulk%20Update%20with%20Spring%20data%20MongoDB%20reactive&packageName=com.maoudia.tutorial&dependencies=data-mongodb-reactive,webflux,testcontainers[`Spring Initializr`, window=\"_blank\"].

=== Structure

Expand Down Expand Up @@ -133,7 +133,7 @@ On utilise `docker-compose` pour créer les conteneurs nécessaires pour ce tuto
services:
mongodb: // <1>
container_name: maoudia-mongodb
image: mongo:5.0.8
image: mongo:7.0.2
environment:
- MONGO_INITDB_DATABASE=test
- MONGO_INITDB_ROOT_USERNAME=admin
Expand All @@ -147,7 +147,7 @@ services:
mongo-express: // <2>
container_name: maoudia-mongo-express
image: mongo-express:0.54.0
image: mongo-express:1.0.0
depends_on:
- mongodb
networks:
Expand All @@ -156,6 +156,8 @@ services:
- ME_CONFIG_MONGODB_SERVER=maoudia-mongodb
- ME_CONFIG_MONGODB_ADMINUSERNAME=admin
- ME_CONFIG_MONGODB_ADMINPASSWORD=password
- ME_CONFIG_BASICAUTH_USERNAME=admin
- ME_CONFIG_BASICAUTH_PASSWORD=password
ports:
- 1515:8081
volumes:
Expand Down
4 changes: 2 additions & 2 deletions content/page/about/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ Technologies I have used* at work and/or side projects.
== My projects 👨‍💻

image:https://github-readme-stats.vercel.app/api/pin/?username=aoudiamoncef&repo=apollo-client-maven-plugin[Apollo client maven plugin project, 400, 140, link = "https://github.com/aoudiamoncef/apollo-client-maven-plugin"]
image:https://github-readme-stats.vercel.app/api/pin/?username=aoudiamoncef&repo=maoudia.com[maoudia.com project, 400, 120, link = "https://github.com/aoudiamoncef/maoudia.com"]
image:https://github-readme-stats.vercel.app/api/pin/?username=aoudiamoncef&repo=maoudia.com[maoudia.com project, 400, 120, link = "https://github.com/maoudia/www.maoudia.com"]

== Github stats 📊

Expand All @@ -424,5 +424,5 @@ image:https://github-readme-streak-stats.herokuapp.com/?user=aoudiamoncef[Github

[NOTE]
====
If you have an idea for a blog post, please submit it by opening an link:https://github.com/aoudiamoncef/maoudia.com/issues[issue].
If you have an idea for a blog post, please submit it by opening an link:https://github.com/maoudia/www.maoudia.com/issues[issue].
====
4 changes: 2 additions & 2 deletions content/page/about/index.fr.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ Les technologies que j'ai utilisées* au travail et/ou dans le cadre de projets
== Mes projets 👨‍💻

image:https://github-readme-stats.vercel.app/api/pin/?username=aoudiamoncef&repo=apollo-client-maven-plugin[projet Apollo client maven plugin, 400, 140, link = "https://github.com/aoudiamoncef/apollo-client-maven-plugin"]
image:https://github-readme-stats.vercel.app/api/pin/?username=aoudiamoncef&repo=maoudia.com[projet maoudia.com, 400, 120, link = "https://github.com/aoudiamoncef/maoudia.com"]
image:https://github-readme-stats.vercel.app/api/pin/?username=aoudiamoncef&repo=maoudia.com[projet maoudia.com, 400, 120, link = "https://github.com/maoudia/www.maoudia.com"]

== Statistiques Github 📊

Expand All @@ -387,5 +387,5 @@ image:https://github-readme-stats.vercel.app/api?username=aoudiamoncef&show_icon

[NOTE]
====
Si vous avez une idée d'article de blog, veuillez la soumettre en ouvrant un link:https://github.com/aoudiamoncef/maoudia.com/issues[ticket].
Si vous avez une idée d'article de blog, veuillez la soumettre en ouvrant un link:https://github.com/maoudia/www.maoudia.com/issues[ticket].
====
2 changes: 1 addition & 1 deletion layouts/404.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ <h1>{{ i18n "pageNotFound" }}</h1>
<p></p>
<p>{{ i18n "errorMessagePart1" }}<a href="{{ "/" | relLangURL}}" title="{{ i18n "homePage" }}">{{ i18n "homePage" }}</a>.</p>
<p></p>
<p>{{ i18n "errorMessagePart2" }} <a href="https://github.com/aoudiamoncef/maoudia.com/issues" rel="noopener noreferrer">{{ i18n "issue" }}</a> {{ i18n "errorMessagePart3" }}.</p>
<p>{{ i18n "errorMessagePart2" }} <a href="https://github.com/maoudia/www.maoudia.com/issues" rel="noopener noreferrer">{{ i18n "issue" }}</a> {{ i18n "errorMessagePart3" }}.</p>
</div>
</article>
</div>
Expand Down

0 comments on commit b7db3bc

Please sign in to comment.