https://github.com/hydephp/action
HydePHP GitHub Actions Workflow
https://github.com/hydephp/action
Last synced: 6 months ago
JSON representation
HydePHP GitHub Actions Workflow
- Host: GitHub
- URL: https://github.com/hydephp/action
- Owner: hydephp
- License: mit
- Created: 2023-03-19T13:41:43.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2025-02-15T17:44:16.000Z (11 months ago)
- Last Synced: 2025-04-08T20:02:01.526Z (9 months ago)
- Language: YAML
- Homepage: https://hydephp.github.io/action
- Size: 521 KB
- Stars: 3
- Watchers: 0
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# HydePHP GitHub Actions Workflow
[](https://github.com/hydephp/action/actions/workflows/continuous-integration.yml)
[](https://github.com/marketplace/actions/build-hydephp-site)
[](https://github.com/hydephp/action/releases/latest)
[](https://github.com/hydephp/action/actions/workflows/test-suite.yml)
[](https://github.com/hyde-staging/github-action-test-project-1/actions/workflows/test.yml)
[](https://github.com/hyde-staging/github-action-test-project-2/actions/workflows/test.yml)
## 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.
```yaml
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.
```yaml
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](https://hydephp.github.io/action/#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](https://hydephp.github.io/action/).