Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GitHub Action to update the documentation #3079

Merged
merged 1 commit into from
Oct 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Add GitHub Action to update the documentation
  • Loading branch information
kylekatarnls committed Oct 10, 2024
commit ec5eddf52db0191dcfe5c576c0b20af3b5828ebe
57 changes: 57 additions & 0 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Documentation

on:
schedule:
- cron: '0 0 15 * *'

jobs:
sponsors:
name: Update documentation

runs-on: ubuntu-latest

steps:
- name: Checkout the code
uses: actions/checkout@v4
with:
ref: gh-pages

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.3
tools: composer:v2

- name: Get composer cache directory
id: composer-cache
shell: bash
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Cache composer dependencies
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: "documentation-${{ hashFiles('**/composer.json') }}"
restore-keys: "documentation-${{ hashFiles('**/composer.json') }}"

- name: Install dependencies
uses: nick-fields/retry@v3
if: steps.composer-cache.outputs.cache-hit != 'true'
with:
timeout_minutes: 10
max_attempts: 3
command: composer update --prefer-dist --no-progress --prefer-stable

- name: Update sponsors on readme.md
run: composer release

- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
branch: job/update-documentation
commit-message: Update documentation
title: Update documentation
body: Monthly automated documentation update
assignees: kylekatarnls
reviewers: kylekatarnls
add-paths: :!history.json
Loading