mirror of
https://github.com/Sped0n/bridget.git
synced 2026-04-14 10:09:31 -07:00
This commit adds a new file `.github/workflows/build.yml` which contains the configuration for a GitHub Actions workflow named "Build". The workflow is triggered on push events to the `main` branch and manually through the workflow_dispatch event. The workflow consists of two jobs: "Filter" and "Build". The "Filter" job checks for changes in specific files (`package.json` and `assets/**`) and sets an output variable `any_changed` to indicate if any of the files have changed. The "Build" job is executed if the following conditions are met: - The workflow is triggered on the `main` branch - The repository is not a fork - The "Filter" job has detected changes in the specified files The steps in the "Build" job include: - Checking out the repository - Setting up Hugo with version 0.114.0 and extended mode - Setting up pnpm version 8 - Getting the pnpm store directory and caching it - Caching the Hugo resources directory - Installing dependencies using pnpm - Building the project using the `pnpm run build` command - Pushing the built artifacts if the workflow was triggered by a merged pull request