Update developer guide #210
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: Update developer guide | |
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: Setup node | |
uses: actions/setup-node@v4 | |
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 |