dispatch-update-guide #2137
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
env: | |
REPO_CONSOLIDATE: "devonfw-guide" | |
BUILD_USER: ${{ secrets.BUILD_USER }} | |
BUILD_USER_PASSWD: ${{ secrets.BUILD_USER_PASSWD }} | |
BUILD_USER_EMAIL: ${{ secrets.BUILD_USER_EMAIL }} | |
MAVEN_OPTS: "-Xmx4096m -Xms2048m" | |
JAVA_OPTS: "-Xmx4096m -Xms2048m" | |
on: | |
repository_dispatch: | |
types: [dispatch-update-guide] | |
workflow_dispatch: | |
name: Generate PDF and Update Website | |
jobs: | |
build: | |
if: ${{ github.repository == 'devonfw/devonfw-guide'}} | |
runs-on: ubuntu-latest | |
steps: | |
- name: setup variable | |
run: | | |
echo "REPO=$(echo '${{ github.event.pull_request.head.repo.full_name }}' | awk -F '/' '{print $1}')" >> $GITHUB_ENV | |
echo "ORG=$(echo '${{ github.repository }}' | awk -F '/' '{print $1}')" >> $GITHUB_ENV | |
shell: bash | |
- name: setup git user | |
run: | | |
git config --global user.email ${BUILD_USER_EMAIL} | |
git config --global user.name ${BUILD_USER} | |
- name: Install imagemagick | |
run: | | |
cd .. | |
sudo apt-get update | |
sudo apt-get install -y imagemagick | |
cd ${REPO_CONSOLIDATE} | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- name: Set up JDK | |
uses: actions/setup-java@v1 | |
with: | |
java-version: '11' | |
- name: Fix PNG images | |
run: | | |
find . -name '*.png' -exec mogrify -interlace none -format png {} + | |
find . -name '*.PNG' -exec mogrify -interlace none -format PNG {} + | |
- name: Trigger update website on success | |
uses: peter-evans/repository-dispatch@v1 | |
with: | |
token: ${{ secrets.GHA_TOKEN }} | |
repository: devonfw/devonfw.github.io | |
event-type: dispatch-update-website | |