Skip to content

Commit e8347a5

Browse files
committed
Use GH Action to deploy pages
1 parent fb7f91a commit e8347a5

File tree

4 files changed

+21
-25
lines changed

4 files changed

+21
-25
lines changed

.github/workflows/publish.yml

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,34 @@ on:
77
schedule:
88
- cron: '0 0 * * *'
99

10+
permissions:
11+
contents: read
12+
pages: write
13+
id-token: write
14+
1015
jobs:
1116
build-and-deploy:
1217
runs-on: ubuntu-latest
1318
steps:
14-
- uses: actions/checkout@v2
15-
- name: Install JDK 11
16-
uses: AdoptOpenJDK/install-jdk@v1
19+
- uses: actions/checkout@v4
20+
- uses: actions/setup-java@v4
1721
with:
18-
version: 11
22+
distribution: 'temurin'
23+
java-version: '11'
1924
- name: Run builds
2025
run: ./.run.builds.sh
2126
- name: Setup Ruby
2227
uses: ruby/setup-ruby@v1
2328
with:
24-
ruby-version: '2.7'
25-
- uses: actions/checkout@v2
26-
with:
27-
ref: "gh-pages"
28-
path: "_gh_pages"
29+
ruby-version: '3.2.1'
2930
- name: Run Jekyll and deploy
3031
run: ./.run.jekyll.sh
32+
- name: Setup Pages
33+
uses: actions/configure-pages@v3
34+
- name: Upload GitHub Pages artifact
35+
uses: actions/upload-pages-artifact@v3
36+
with:
37+
path: ./_site/
38+
- name: Deploy to GitHub Pages
39+
id: deployment
40+
uses: actions/deploy-pages@v4

.run.builds.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,3 @@
22
set -e
33

44
mvn clean install
5-
#./gradlew build

.run.jekyll.sh

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,5 @@ echo "⚙️ Building with Jekyll"
55
gem install bundler
66
bundle install
77
bundle exec jekyll build
8-
mv _site/README.html _site/index.html || true
9-
10-
echo "⚙️ Copying the files"
11-
rm -rf _gh_pages/*
12-
cp -R _site/* _gh_pages/
13-
14-
echo "🚀 Commit and push"
15-
cd _gh_pages || exit
16-
git config --global user.email "howtos@vertx.io"
17-
git config --global user.name "Vert.x howtos"
18-
git add -A
19-
git commit -m "Deploy the how-to pages"
20-
git push origin gh-pages
218

229
echo "✅ Done"

Gemfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
source "https://rubygems.org"
22

3-
gem "jekyll", "~> 3.8.5"
3+
gem "jekyll", "~> 3"
4+
gem "webrick"
45

56
group :jekyll_plugins do
6-
gem 'asciidoctor'
77
gem 'jekyll-asciidoc'
88
end
99

0 commit comments

Comments
 (0)