Skip to content

chore(deps): Bump dawidd6/action-download-artifact from 3 to 6 #869

chore(deps): Bump dawidd6/action-download-artifact from 3 to 6

chore(deps): Bump dawidd6/action-download-artifact from 3 to 6 #869

Workflow file for this run

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 'github-actions@github.com'
git add docs/*
git commit -am "chore(docs): Update auto-generated docs"
git push