Skip to content

hydephp/action

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

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HydePHP GitHub Actions Workflow

Continuous Integration GitHub Marketplace GitHub Release

Test Suite Integration Test 1 Integration 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 Site

on: [push]

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - 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 Site

on: [push]

jobs:
  build:
    runs-on: ubuntu-latest
    permissions:
      contents: read
      pages: write
      id-token: write
    steps:
      - uses: actions/checkout@v3
      - uses: hydephp/action@master
        with:
          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 Name Description Default Value
deploy-to Specify what to do with the compiled site.
Supported options are: ["artifact", "pages"]
"artifact"
upload-artifact Upload the site artifact, regardless of the deploy-to option false
debug Enable additional debug output false
framework-version Specify the HydePHP Framework version to use
(only applicable for anonymous projects)
"latest"
directory The directory to use as the project root none
config String of lines to add to the hyde.yml config file none
env List of environment variables to set in the format NAME=value none

Further documentation

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