diff --git a/.github/workflows/compile.yml b/.github/workflows/compile.yml index 20d6d5f..b328eef 100644 --- a/.github/workflows/compile.yml +++ b/.github/workflows/compile.yml @@ -4,6 +4,7 @@ on: workflow_call: inputs: name: + description: 'Name of the tool to compile' required: true type: string diff --git a/.github/workflows/ford.yml b/.github/workflows/ford.yml new file mode 100644 index 0000000..b3ace6d --- /dev/null +++ b/.github/workflows/ford.yml @@ -0,0 +1,45 @@ +name: Fordoc + +on: + workflow_call: + inputs: + name: + description: 'Name of the tool to create documentation for' + required: true + type: string + docdir: + description: 'Path to the docu directory' + required: true + type: string + +permissions: + contents: write + +concurrency: + group: "pages" + cancel-in-progress: true + +jobs: + ford-pages: + runs-on: ubuntu-latest + steps: + - name: Checkout Code + uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Build ${{ inputs.name }} Documentation + uses: apes-suite/build-action@v1.1.1 + with: + waf-args: "--fordonline configure docu" + obtain: "${{ inputs.docdir }}/docu" + + - name: Change docu ownership + run: | + sudo chown -R $USER docu + + - name: Deploy Documentation + uses: JamesIves/github-pages-deploy-action@v4 + with: + branch: gh-pages + folder: docu diff --git a/README.md b/README.md index 3eff726..d501674 100644 --- a/README.md +++ b/README.md @@ -5,9 +5,19 @@ Reusable Github workflows for the APES repositories Takes a `name` input parameter to label the build step accordingly. The waf unit tests are being run and their report is published accordingly. This should only be run in pull request. + Needs the permission to write `checks` and `pull-requests`. + +* **ford.yml**: create FORD documentation with waf and deploy it to the github + pages of the repository. Takes a `name` indicating the tool for which the + documentation is to be created and a `docdir` indicating the parent directory + of the generated `docu` directory. + This workflow occupies the "pages" group and cancels running workflows. + Usually you only want this workflow to run upon pushs to the main branch. + Needs the permission to write content to the repository. * **tag.yml**: automatically tag the repository with a new version with the [autotag-action](https://github.com/phish108/autotag-action), it should be used upon closing a pull request. Versions are following the semver format of `v#major.#minor.#patch`. To indicate which level should be increased, the commits have to contain on of those tags. The default is `#patch`. + Needs the permission to write content to the repository.