chore(deps): Bump dawidd6/action-download-artifact from 6 to 8 #1079
Workflow file for this run
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: Generate documentation | |
on: | |
pull_request: | |
branches: | |
- develop | |
- master | |
- releasecandidate/* | |
workflow_dispatch: | |
jobs: | |
buildDocsGenerator: | |
outputs: | |
currentDocs_hash: ${{ steps.currentDocs.outputs.hash }} | |
newDocs_hash: ${{ steps.newDocs.outputs.hash }} | |
name: Build docs generator | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup dotnet | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: '8.0.x' | |
- name: Build docs generator | |
working-directory: ./docs_generator | |
run: dotnet build Scanner.csproj | |
- name: Generate current state of docs | |
id: currentDocs | |
run: echo "hash=$(find docs/ -type f -exec md5sum {} \; | md5sum)" >> $GITHUB_OUTPUT | |
- name: Clear /docs folder | |
working-directory: ./ | |
run: rm -rf docs/* | |
- name: Execute docs runner | |
working-directory: ./unity-ggjj | |
run: ../docs_generator/bin/Debug/net8.0/Scanner | |
- name: Generate new state of docs | |
id: newDocs | |
run: echo "hash=$(find docs/ -type f -exec md5sum {} \; | md5sum)" >> $GITHUB_OUTPUT | |
- name: Check if current and new state of docs are different | |
run: echo "Current '${{ steps.currentDocs.outputs.hash }}' - New '${{ steps.newDocs.outputs.hash }}'" | |
- name: Upload '/docs' artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: docs-v${{ github.run_number }} | |
path: ./docs | |
pushCommits: | |
name: Push commits | |
needs: [buildDocsGenerator] | |
if: needs.buildDocsGenerator.outputs.currentDocs_hash != needs.buildDocsGenerator.outputs.newDocs_hash | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.head_ref }} | |
token: ${{ secrets.PATDOCSGEN }} | |
- name: Clear /docs folder | |
run: rm -rf docs/* | |
- name: Download ${{ matrix.platforms.outputName }} | |
uses: actions/download-artifact@v4 | |
with: | |
name: docs-v${{ github.run_number }} | |
path: ./docs | |
- name: Commit generated documentation | |
run: | | |
git config --global user.name github-actions | |
git config --global user.email '[email protected]' | |
git add docs/* | |
git commit -am "chore(docs): Update auto-generated docs" | |
git push |