Sha256: a06c9bc359240f44349f4242da7f1b1747cc1b057c79a2c35a568464d90499bc

Contents?: true

Size: 1.67 KB

Versions: 1

Compression:

Stored size: 1.67 KB

Contents

# This file is synced from rom-rb/template-gem repo

name: docsite

on:
  push:
    paths:
      - docsite/**
      - .github/workflows/docsite.yml
    branches:
      - main
      - release-**
    tags:

jobs:
  update-docs:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
        with:
          fetch-depth: 0
      - run: |
          git fetch --no-tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/*
      - name: Set up Ruby
        uses: ruby/setup-ruby@v1
        with:
          ruby-version: "3.1"
      - name: Set up git user
        run: |
          git config --local user.email "rom-bot@rom-rb.org"
          git config --local user.name "rom-bot"
      - name: Install dependencies
        run: gem install ossy --no-document
      - name: Update release branches
        run: |
          branches=`git log --format=%B -n 1 $GITHUB_SHA | grep "docsite:release-" || echo "nothing"`

          if [[ ! $branches -eq "nothing" ]]; then
            for b in $branches
            do
              name=`echo $b | ruby -e 'puts gets[/:(.+)/, 1].gsub(/\s+/, "")'`

              echo "merging $GITHUB_SHA to $name"

              git checkout -b $name --track origin/$name

              echo `git log -n 1`

              git cherry-pick $GITHUB_SHA -m 1
            done

            git push --all "https://rom-bot:${{secrets.GH_PAT}}@github.com/$GITHUB_REPOSITORY.git"

            git checkout main
          else
            echo "no need to update branches"
          fi
      - name: Trigger rom-rb.org deploy
        env:
          GITHUB_LOGIN: rom-bot
          GITHUB_TOKEN: ${{secrets.GH_PAT}}
        run: ossy github workflow rom-rb/rom-rb.org ci

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rom-factory-0.12.0 .github/workflows/docsite.yml