Bump protobufjs from 5.0.3 to 7.5.5 in /machinetalk-protobuf #18
Workflow file for this run
This file contains hidden or 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: Build site preview | |
| on: | |
| pull_request: | |
| branches: | |
| - master | |
| push: | |
| branches: | |
| - '*' | |
| - '!master' | |
| jobs: | |
| # This job is only temporary solution until a new Jekyll builder (Dockerfile) is | |
| # created. Then the logic will be reworked. | |
| buildMachinekitSite: | |
| runs-on: ubuntu-latest | |
| env: | |
| ACTING_SHA: ${{ github.sha }} | |
| OUTPUT_NAME: 'machinekit-site-${{ github.sha }}' | |
| ACTING_REPOSITORY: ${{ github.repository }} | |
| steps: | |
| # Locally clone the repository which we want to build with depth of 5 commits | |
| - name: Checkout the pull request for Machinekit-docs | |
| uses: actions/checkout@v2 | |
| with: | |
| repository: '${{ env.ACTING_REPOSITORY }}' | |
| ref: ${{ env.ACTING_SHA }} | |
| path: to_build | |
| fetch-depth: '5' | |
| - name: Git SHA on which the build is requested | |
| run: echo ${{ env.ACTING_SHA }} | |
| - name: Git log of repository on which the build is requested | |
| run: git log | |
| working-directory: ./to_build | |
| # Create directory for output files and export it's name as a environment variable | |
| - name: Create output directory | |
| run: | | |
| mkdir ./${{ env.OUTPUT_NAME }} | |
| echo "OUTPUT_DIRECTORY=$(pwd)/${{ env.OUTPUT_NAME }}" >> "$GITHUB_ENV" | |
| echo "The output directory is ${{ env.OUTPUT_DIRECTORY }}" | |
| mkdir ./${{ env.OUTPUT_NAME }}/build | |
| # The commits pushed to gh-pages branch will appear as originated from the author | |
| # of the changes | |
| - name: Create JSON with commit metadata | |
| env: | |
| FILENAME: '$OUTPUT_DIRECTORY/build-metadata.json' | |
| run: | | |
| echo "###########################################################" | |
| echo "# Commit which will be used for mining of the credentials #" | |
| echo "###########################################################" | |
| git log -n 1 --no-merges HEAD | |
| jq -n --arg authoremail "$(git log --format='%ae' -n 1 --no-merges HEAD)" --arg authorname "$(git log --format='%an' -n 1 --no-merges HEAD)" --arg commitmsg "$(git log --format='%B' -n 1 --no-merges HEAD)" --arg sha "${{ env.ACTING_SHA }}" '{"author":"\($authorname)","email":"\($authoremail)","message":"\($commitmsg)","sha":"\($sha)"}' > ${{ env.FILENAME }} | |
| echo "###########################################################" | |
| echo "# JSON file with metadata information of pertinent commit #" | |
| echo "###########################################################" | |
| echo "Whole path: ${{ env.FILENAME }}" | |
| echo "" | |
| cat ${{ env.FILENAME }} | |
| working-directory: ./to_build | |
| # Running the commands in ubuntu-master and not in Docker container because | |
| # of the age of the container -> It cannot be even build anymore | |
| - name: Run the Jekyll builder | |
| run: docker run -v $(pwd)/to_build:/work haberlerm/docker-jekyll-asciidoctor jekyll build --verbose --trace --config _config.yml,_config_devel.yml | |
| - name: Print newly created files | |
| run: find . -print0 | xargs -0 -I '{}' ls --color -d '{}' | |
| working-directory: ./to_build | |
| - name: Copy the newly generated site to output directory | |
| run: cp -r to_build/_site/* ${{ env.OUTPUT_DIRECTORY }}/build | |
| - name: Upload the artifact | |
| uses: actions/upload-artifact@v1 | |
| with: | |
| name: ${{ env.OUTPUT_NAME}} | |
| path: ${{ env.OUTPUT_DIRECTORY}} |