mirror of
https://github.com/ivuorinen/homebrew-tap.git
synced 2026-02-12 18:49:26 +00:00
67 lines
1.3 KiB
YAML
67 lines
1.3 KiB
YAML
---
|
|
name: Build and Deploy Documentation
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- "Formula/**"
|
|
- "docs/**"
|
|
- "scripts/**"
|
|
- "theme/**"
|
|
workflow_dispatch:
|
|
|
|
permissions: read-all
|
|
|
|
concurrency:
|
|
group: pages
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
pages: write
|
|
id-token: write
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v5
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Setup Ruby
|
|
uses: ruby/setup-ruby@v1
|
|
|
|
- name: Parse Formulae and Build Site
|
|
run: |
|
|
ruby scripts/parse_formulas.rb
|
|
echo "Generated formulae.json with $(jq '.formulae | length' docs/_data/formulae.json) formulae"
|
|
ruby scripts/build_site.rb
|
|
|
|
- name: Setup Pages
|
|
id: pages
|
|
uses: actions/configure-pages@v5
|
|
|
|
- name: Upload Pages Artifact
|
|
uses: actions/upload-pages-artifact@v3
|
|
with:
|
|
path: docs
|
|
|
|
deploy:
|
|
environment:
|
|
name: github-pages
|
|
url: ${{ steps.deployment.outputs.page_url }}
|
|
runs-on: ubuntu-latest
|
|
needs: build
|
|
|
|
permissions:
|
|
contents: read
|
|
pages: write
|
|
id-token: write
|
|
|
|
steps:
|
|
- name: Deploy to GitHub Pages
|
|
id: deployment
|
|
uses: actions/deploy-pages@v4
|