-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
59c5b68
commit 880bafd
Showing
1 changed file
with
41 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: run-rundoc | ||
run-name: running rundoc on tutorials | ||
on: | ||
schedule: | ||
# This schedule triggers the workflow at 00:00 every Monday | ||
- cron: '0 0 * * 1' | ||
workflow_dispatch: | ||
jobs: | ||
rundoc-ubuntu: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.head_ref }} | ||
- uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: '3.3.2' | ||
bundler-cache: true # do run 'bundle install' and cache | ||
working-directory: .rundoc-workspace | ||
- uses: buildpacks/github-actions/[email protected] | ||
# [CONFIG] here for the path of what we want to generate | ||
- run: bundle exec rundoc ../docs/src/ruby/ruby_tutorial.md --on-success-dir ../docs/ruby --on-failure-dir ../docs/fail --force | ||
working-directory: .rundoc-workspace | ||
continue-on-error: true | ||
- run: rm -rf ruby-getting-started | ||
working-directory: docs/ruby | ||
continue-on-error: true | ||
# [CONFIG] then here move and rename README.md to the appropriate place | ||
- run: echo "NOW=$(date +'rundoc-linux/%s')" >> $GITHUB_ENV | ||
- run: echo "HUMAN_DATE=$(date +'update tutorials - %Y %b %d')" >> $GITHUB_ENV | ||
- name: Create Pull Request | ||
uses: peter-evans/create-pull-request@v6 | ||
with: | ||
branch: ${{ env.NOW }} | ||
base: main | ||
commit-message: run rundoc | ||
title: ${{ env.HUMAN_DATE }} | ||
body: "generated by the [run-rundoc linux github action](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})" |