Skip to content

Commit 5252b46

Browse files
committed
Add steps to publish multi-language content archive to Github Pages
1 parent a806509 commit 5252b46

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

.github/workflows/build.yml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build and Tests
1+
name: Build, Tests and Deploy to GitHub Pages
22

33
on:
44
push:
@@ -11,6 +11,7 @@ on:
1111
- '[0-9]+.[0-9]+.[0-9]+'
1212
pull_request:
1313
types: [ opened, synchronize, reopened ]
14+
workflow_dispatch: # Ajout du déclencheur manuel
1415

1516
jobs:
1617
build:
@@ -49,3 +50,22 @@ jobs:
4950
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
5051
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
5152
run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar
53+
54+
deploy:
55+
name: Deploy to GitHub Pages
56+
# Restrict GitHub Pages deploy only for "main" branch or release
57+
#if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')
58+
runs-on: ubuntu-latest
59+
needs: build
60+
permissions:
61+
pages: write
62+
id-token: write
63+
steps:
64+
- name: Upload artifact for GitHub Pages
65+
uses: actions/[email protected]
66+
with:
67+
path: target/classes
68+
destination-dir: ${{ github.ref_name }} # Use branch name or tag name as sub-directory
69+
70+
- name: Deploy to GitHub Pages
71+
uses: actions/deploy-pages@v2

0 commit comments

Comments
 (0)