DEV Community

Cover image for Introducing the HydePHP GitHub Action: The Easiest Way to Build and Deploy Your Static Sites!
CodeWithCaen
CodeWithCaen

Posted on • Updated on • Originally published at hydephp.com

Introducing the HydePHP GitHub Action: The Easiest Way to Build and Deploy Your Static Sites!

I'm thrilled to announce the first stable release of the HydePHP GitHub Action!

If you haven't heard about HydePHP yet, it's the static site generator you've been waiting for, combining the power of Laravel with the simplicity of Markdown. And now, with the HydePHP GitHub Action, building and deploying your GitHub-hosted HydePHP projects has never been easier.

HydePHP - A Quick Recap

HydePHP - The Static Site Generator You've Been Waiting For, is here.

With HydePHP, you can create websites, blogs, documentation sites, and more, using the robust Laravel framework and the simplicity of Markdown. Your next website is just minutes away from becoming a reality.

HydePHP GitHub Action: Your Workflow Companion

The HydePHP GitHub Action is a workflow that automates the building and deploying of HydePHP projects. It simplifies the entire process, allowing you to focus on creating content rather than worrying about the deployment pipeline.

Features and Benefits

  • Automatic Project Detection: The action automatically detects whether your repository is a full HydePHP project or an "anonymous" project containing only Markdown/Blade source files.

  • Versatile Deployment Options: Choose to upload the site as a workflow artifact or deploy it directly to GitHub Pages. The choice is yours!

  • GitHub Marketplace Integration: Find and install the HydePHP GitHub Action directly from the GitHub Marketplace.

  • Easy Configuration: Customize the action with various configuration options to tailor it to your project's needs.

Getting Started

Starter Workflow

The most basic usage of the action involves building the site and uploading the result as a workflow artifact. Here's a simple example:

name: Build HydePHP Site

on: [push]

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: hydephp/action@master
Enter fullscreen mode Exit fullscreen mode

Deployment to GitHub Pages

To deploy your site directly to GitHub Pages, use the following example:

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"
Enter fullscreen mode Exit fullscreen mode

It's that easy! Just remember to configure your repository to use GitHub Pages using the Actions workflow, as shown in the image below.

1: Visit the settings tab of your repository. 2: Click on the

Configuration Options

The HydePHP GitHub Action provides several configuration options to suit your needs. Here are a few examples:

  • deploy-to: Specify the deployment destination ("artifact" or "pages").
  • upload-artifact: Force the upload of the site artifact.
  • framework-version: Specify the HydePHP Framework version.
  • ... and more. You can even pass configuration options to be added to the hyde.yml config file!

For a comprehensive list of configuration options, check out the documentation.

Explore the Documentation

For in-depth information, including detailed usage examples and configuration options, check out the live documentation at hydephp.github.io/action.

Conclusion

The new HydePHP GitHub Action brings simplicity and efficiency to the process of building and deploying your HydePHP projects. Why not try it out today?

In the words of those that have tried it already: "This thing literally worked right out of the box. Honestly, what!? Since when do things work so easily and so smoothly?" - Peter Aleksander Bizjak

AI Transparency Disclaimer

THe disposition for this article was created using the help of an LLM AI. It was then edited and proofed by a human to make it perfect.

Top comments (0)