File: documentation.yml

package info (click to toggle)
php-nesbot-carbon 3.10.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 19,132 kB
  • sloc: php: 163,896; xml: 119; makefile: 32; sh: 14
file content (59 lines) | stat: -rw-r--r-- 1,666 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Documentation

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

jobs:
  sponsors:
    name: Update documentation

    runs-on: ubuntu-latest

    steps:
      - name: Checkout the code
        uses: actions/checkout@v5
        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
        if: github.repository_owner == 'briannesbitt'
        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