Pull project-specific documentation #612
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: Pull project-specific documentation | |
| # This workflow pulls the latest project-specific documentation from various repositories | |
| # and updates the upstream documentation in the osbuild.github.io repository. | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '0 7 * * *' | |
| jobs: | |
| update-developer-guide: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repository | |
| run: | | |
| git clone "https://${{ secrets.GIT_USERNAME }}:${{ secrets.SCHUTZBOT_TOKEN }}@github.com/osbuild/osbuild.github.io.git" | |
| cd osbuild.github.io | |
| git config user.email "${{ secrets.GIT_EMAIL }}" | |
| git config user.name "${{ secrets.GIT_USERNAME }}" | |
| - name: Test pull_readmes script | |
| working-directory: ./osbuild.github.io | |
| run: | | |
| make test | |
| - name: Pull readmes and fix links | |
| working-directory: ./osbuild.github.io | |
| run: | | |
| make pull-readmes | |
| - name: Pull modules | |
| working-directory: ./osbuild.github.io | |
| run: | | |
| make pull-osbuild-modules | |
| - name: Pull image-builder | |
| working-directory: ./osbuild.github.io | |
| run: | | |
| make pull-image-builder | |
| - name: Pull koji-image-builder | |
| working-directory: ./osbuild.github.io | |
| run: | | |
| make pull-koji-image-builder | |
| - name: Install podman | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y podman | |
| - name: Pull image descriptions | |
| working-directory: ./osbuild.github.io | |
| run: | | |
| make pull-image-descriptions | |
| - name: Setup node | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 18 | |
| cache: npm | |
| cache-dependency-path: ./osbuild.github.io/package-lock.json | |
| - name: Test build website | |
| working-directory: ./osbuild.github.io | |
| run: | | |
| make build | |
| - name: Push updates | |
| working-directory: ./osbuild.github.io | |
| run: | | |
| git add . | |
| CHANGES=$(git status --porcelain | wc -l) | |
| if [ "$CHANGES" -gt "0" ]; then | |
| git status | |
| git commit -m "Automated developer guide update" | |
| git push origin main | |
| else | |
| echo "No updates found." | |
| fi |