Inscription button management (#42) #5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## 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 |