Publishes a directory as the GitHub Pages website for the current repository.
steps:
- uses: actions/checkout@v4
- uses: giancosta86/aurora-github/actions/publish-github-pages@v10Please, note: this action is automatically run by:
-
If
source-directoryis set to an empty string (the default) or refers to a missing directory, ifoptionalis set to true the action will simply exit, otherwise the workflow will fail. -
If
source-directorycontains:-
a package.json file:
-
Run enforce-branch-version, forwarding the
enforce-branch-versioninput to itsmodeinput. -
Set up a NodeJS environment via setup-nodejs-context in
source-directory. -
Run
pnpm build. -
The dist subdirectory will contain the actual website.
-
-
a pom.xml file:
-
Run enforce-branch-version, forwarding the
enforce-branch-versioninput to itsmodeinput. -
Run
mvn site. -
The target/site subdirectory will contain the actual website.
-
-
-
If
dry-runis set to true, interrupt the process without failing. -
Publish the files to GitHub Pages.
-
The following permissions must be set for the action to work:
-
pages: write -
id-token: write
Please, note: at the same time, you may want to declare your required default permissions - such as
contents, necessary for some Git operations - because, otherwise, they would be disabled by an explicitpermissionsblock. -
-
GitHub Pages must be enabled for the current repository - and having GitHub Actions as their source.
-
It is recommended that GitHub Actions have read/write permissions on the repository.
-
Please, refer to setup-nodejs-context for details about setting up a NodeJS environment.
| Name | Type | Description | Default value |
|---|---|---|---|
source-directory |
string | Directory containing the website | . |
optional |
boolean | Whether source-directory can be empty string or missing directory |
false |
enforce-branch-version |
inject,check,skip |
How the branch version should be enforced | inject |
dry-run |
boolean | Stop the publication just before uploading | false |
| Name | Type | Description | Example |
|---|---|---|---|
url |
string | The URL of the published website | HTTPS url |