A GitHub Action that fetches a web page with Plasmate and outputs the Semantic Object Model (SOM).
- uses: plasmate-labs/som-action@v1
with:
url: https://example.com
id: som
- run: echo "Page title: ${{ steps.som.outputs.title }}"| Input | Required | Default | Description |
|---|---|---|---|
url |
✅ | — | URL to fetch |
format |
❌ | json |
Output format (json or text) |
| Output | Description |
|---|---|
som |
The full SOM JSON output |
title |
Page title extracted from the SOM |
tokens |
Approximate token count of the SOM |
name: Scrape and Process
on:
workflow_dispatch:
inputs:
url:
description: 'URL to scrape'
required: true
jobs:
scrape:
runs-on: ubuntu-latest
steps:
- uses: plasmate-labs/som-action@v1
with:
url: ${{ github.event.inputs.url }}
id: som
- name: Display results
run: |
echo "Title: ${{ steps.som.outputs.title }}"
echo "Tokens: ${{ steps.som.outputs.tokens }}"
- name: Save SOM
run: echo '${{ steps.som.outputs.som }}' > som.json
- uses: actions/upload-artifact@v4
with:
name: som-output
path: som.jsonname: Monitor Page Changes
on:
schedule:
- cron: '0 */6 * * *' # Every 6 hours
jobs:
monitor:
runs-on: ubuntu-latest
steps:
- uses: plasmate-labs/som-action@v1
with:
url: https://example.com/status
id: som
- name: Check for changes
run: |
echo "Current title: ${{ steps.som.outputs.title }}"
# Add your change detection logic here- Builds a Docker container with Plasmate installed
- Fetches the specified URL using
plasmate fetch - Parses the SOM JSON to extract metadata
- Outputs the full SOM and extracted fields as step outputs
MIT