Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
box

GitHub Action

Build HydePHP Site

v0.4.0 Pre-release

Build HydePHP Site

box

Build HydePHP Site

Build and deploy the HydePHP project

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Build HydePHP Site

uses: hydephp/action@v0.4.0

Learn more about this action in hydephp/action

Choose a version

Experimental GitHub Actions HydePHP 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: "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.

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 Specify what to do with the compiled site.
Supported options are: ["artifact", "pages"]
"artifact"
upload-artifact Upload the site artifact, regardless of the deploy option false
debug Enable additional debug output false
env-site-name Set the SITE_NAME environment variable none
env-site-url Set the SITE_URL environment variable none
env-torchlight-token Set the TORCHLIGHT_TOKEN environment variable none

Further documentation

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