Skip to content
Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

HydePHP GitHub Actions Workflow

Continuous IntegrationGitHub MarketplaceGitHub Release

Test SuiteIntegration Test 1Integration Test 2

About

The HydePHP Site Builder Action is a GitHub Action you can use in your Actions Workflow and that takes care building and deploying of HydePHP projects. It can upload the site as a workflow artifact or deploy directly to GitHub Pages.

The action can be used with full HydePHP projects or "anonymous" projects containing only Markdown/Blade source files. The strategy used is automatically determined by the action depending on the contents of the repository.

Usage

Starter Workflow

The following example shows the most basic usage of the action. It will build the site and upload the result as a workflow artifact.

name: Build HydePHP Siteon: [push]jobs:
build:
runs-on: ubuntu-lateststeps:
- uses: actions/checkout@v3
- uses: hydephp/action@master

The artifact will be uploaded as build and can be downloaded from the workflow run, or in a subsequent workflow step for custom deployment.

With Deployment

The following example shows how to deploy the site to GitHub Pages. The action will build the site and deploy directly to GitHub Pages.

name: Build and Deploy HydePHP Siteon: [push]jobs:
build:
runs-on: ubuntu-latestpermissions:
contents: readpages: writeid-token: writesteps:
- uses: actions/checkout@v3
- uses: hydephp/action@masterwith:
deploy-to: "pages"

Note that the GitHub token must have the proper permissions. You also need to configure your repository to use GitHub Pages using the Actions workflow.

You can enable Pages by visiting the Pages section of your repository settings, and setting the build and deployment source to GitHub Actions.

Configuration Options

There are a few more configuration options available, that can be supplied to the action using the with keyword, as shown in the examples above.

Input NameDescriptionDefault Value
deploy-toSpecify what to do with the compiled site.
Supported options are: ["artifact", "pages"]
"artifact"
upload-artifactUpload the site artifact, regardless of the deploy-to optionfalse
debugEnable additional debug outputfalse
framework-versionSpecify the HydePHP Framework version to use
(only applicable for anonymous projects)
"latest"
directoryThe directory to use as the project rootnone
configString of lines to add to the hyde.yml config filenone
envList of environment variables to set in the format NAME=valuenone
pre-buildShell commands to run after dependencies are installed, but before the site is builtnone
post-buildShell commands to run after the site is built, but before it is deployednone

Further documentation

See the live documentation, built with this action and through this repository, at hydephp.github.io/action.

About

HydePHP GitHub Actions Workflow

Resources

Code of conduct

Contributing

Security policy

Stars

4 stars

Watchers

0 watching

Forks

Releases

Sponsor this project

Used by

Contributors

Languages