build(deps): bump org.apache.commons:commons-compress from 1.26.2 to 1.27.0 #125
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
name: Project Site | |
on: | |
release: | |
pull_request: | |
paths: | |
- 'src/**' | |
- 'pom.xml' | |
- '.github/workflows/site.yml' | |
push: | |
branches: | |
- master | |
paths: | |
- 'src/site/**' | |
- 'src/changes/**' | |
- 'pom.xml' | |
- '.github/workflows/site.yml' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout master | |
uses: actions/checkout@v4 | |
with: | |
path: nom-tam-fits | |
- name: Checkout gh-pages | |
uses: actions/checkout@v4 | |
with: | |
ref: 'gh-pages' | |
path: site | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '17' | |
distribution: 'adopt' | |
cache: maven | |
server-username: 'git' | |
- name: Build site with Maven | |
run: mvn clean site | |
working-directory: ./nom-tam-fits | |
- name: About this workflow... | |
run: | | |
echo github.event_name = ${{ github.event_name }} | |
echo github.repository_owner = ${{ github.repository_owner }} | |
echo github.ref_name = ${{ github.ref_name }} | |
# Upload site only for official releases or if master commit message contains 'site update' | |
- name: Update site | |
if: github.repository_owner == 'nom-tam-fits' && (github.event_name == 'release' || contains(github.event.head_commit.message, 'site update')) | |
run: | | |
cp -a nom-tam-fits/target/site/* site/ | |
cd site | |
git config --global user.email "$GITHUB_JOB+github-actions[bot]@users.noreply.github.com" | |
git config --global user.name "github-actions" | |
git add -A | |
git commit -m "[automated site update]" && git push || true |