-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added specific manually triggered workflow for documentation and remo…
…ved documentation from build.yaml and pullrequest.yaml (#201)
- Loading branch information
1 parent
734a2b1
commit 8f7b03c
Showing
3 changed files
with
69 additions
and
49 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
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,61 @@ | ||
# This is a basic workflow to help you get started with Actions | ||
|
||
name: CI_DOCUMENTATION | ||
|
||
# Controls when the action will run. Triggers the workflow on push | ||
# events but only for the master branch | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
GeneratePR: | ||
description: 'Generate the PR at the end' | ||
required: true | ||
default: false | ||
type: boolean | ||
|
||
# This workflow contains one job called "build_documentation" | ||
jobs: | ||
build_documentation: | ||
# The type of runner that the job will run on | ||
runs-on: windows-2022 | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
# Runs a set of commands using the runners shell | ||
# Support longpaths | ||
- name: Support long paths | ||
run: git config --system core.longpaths true | ||
|
||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: '1' | ||
submodules: 'true' | ||
|
||
- name: Clear documentation folder | ||
run: Remove-Item .\docs\* -Recurse -Force -Exclude _config.yml,CNAME | ||
|
||
- run: dotnet tool update -g docfx | ||
|
||
- name: Build documentation | ||
run: | | ||
cd src\documentation | ||
docfx | ||
- name: Extract commit SHA | ||
run: | | ||
echo "GITHUB_COMMIT_MESSAGE=$(echo $GITHUB_SHA | cut -c 1-7)" >> $GITHUB_ENV | ||
shell: bash | ||
|
||
- name: Request a PR to commit changes | ||
if: ${{ github.repository_owner == 'masesgroup' && inputs.GeneratePR == true }} #do not push any changes outside main repo or GeneratePR is false | ||
uses: peter-evans/create-pull-request@v5 | ||
with: | ||
branch-suffix: short-commit-hash | ||
add-paths: docs/*.* | ||
commit-message: Update documentation after commit ${{ env.GITHUB_COMMIT_MESSAGE }} | ||
title: Changes by GitHub action | ||
body: Automated changes by GitHub action | ||
reviewers: masesdevelopers | ||
assignees: masesdevelopers | ||
labels: documentation, enhancement |
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