This GitHub action updates (or creates) the gh-pages branch of a GAP package using
GitHubPagesForGAP.
Caution
By default this action regenerates the gh-pages branch of your repository
from scratch. If you made custom modifications to that branch, you need to
disable this behavior by setting the clean input to false.
The action update-gh-pages has to be called by the workflow of a GAP
package. By default, it will use the latest release of the package.
All of the following inputs are optional.
version:- Set to a non-empty string to choose a specific release of your package (e.g.
v1.2.3) instead of the latest release. - default:
''
- Set to a non-empty string to choose a specific release of your package (e.g.
clean:- Set to
falseto only update the information on the website and not the website code itself. This can be useful if you have made modifications to it. - default:
true
- Set to
dry-run:- Set to
trueto create an archive containing the website instead of pushing to thegh-pagesbranch. - default:
false
- Set to
extra-files:- Set to a non-empty string to specify files and directories to copy from the package repository to the website.
- The string should be comma-separated list of colon-separated pairs of files and/or directories of the form
source:destinationto be copied from the package to thegh-pagesbranch (relative to the root directory, in both cases).- For example, setting the
extra-filesoption tod1/f1:D1/F1,d2:D2/D3will copy the filed1/f1and the directoryd2, respectively, from the package repository to the fileD1/F2and to the directoryD2/D3/of thegh-pagesbranch, creating new directories as necessary. - For example, setting the
extra-filesoption toCHANGES.md,help/README-extra.mdwill copy the filesCHANGES.mdandhelp/README-extra.mdfrom the package repository to thegh-pagesbranch with the same names and path structures.
- For example, setting the
See below for a minimal example to run this action.
name: Update GH-pages
on:
workflow_dispatch:
permissions: write-all
jobs:
update:
name: Update GH pages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: gap-actions/setup-gap@v2
- uses: gap-actions/update-gh-pages@v1name: Update GH-pages
on:
workflow_dispatch:
inputs:
version:
description: 'Set to a non-empty string to choose a specific release of your package'
required: false
type: string
default: ''
clean:
description: 'Set to false to only update the information on the website and not the website code itself'
required: false
type: boolean
default: true
dry-run:
description: 'Set to true to create an archive containing the website instead of pushing to the gh-pages branch'
required: false
type: boolean
default: false
extra-files:
description: 'A comma-separated list of colon-separated pairs of files and/or directories to be copied from the package to the gh-pages branch'
required: false
type: string
default: ''
permissions: write-all
jobs:
update:
name: Update GH pages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: gap-actions/setup-gap@v2
- uses: gap-actions/update-gh-pages@v1
with:
version: ${{ inputs.version }}
clean: ${{ inputs.clean }}
dry-run: ${{ inputs.dry-run }}Please submit bug reports, suggestions for improvements and patches via the issue tracker.
The action update-gh-pages is free software; you can redistribute
and/or modify it under the terms of the GNU General Public License as published
by the Free Software Foundation; either version 2 of the License, or (at your
opinion) any later version. For details, see the file LICENSE distributed
with this action or the FSF's own site.