{"id":20660658,"url":"https://github.com/treecg/ldes-action","last_synced_at":"2025-04-19T15:09:37.483Z","repository":{"id":36951639,"uuid":"399016830","full_name":"TREEcg/LDES-Action","owner":"TREEcg","description":"Republishes a Linked Data Event Stream or tree:Collection on GitHub Pages using a GitHub Action","archived":false,"fork":false,"pushed_at":"2023-01-17T09:24:43.000Z","size":13874,"stargazers_count":9,"open_issues_count":19,"forks_count":4,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-04-09T10:01:59.462Z","etag":null,"topics":["actions","github-actions","ldes","linked-data-event-streams"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TREEcg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-08-23T07:47:08.000Z","updated_at":"2022-11-22T12:36:41.000Z","dependencies_parsed_at":"2023-02-10T09:00:34.673Z","dependency_job_id":null,"html_url":"https://github.com/TREEcg/LDES-Action","commit_stats":{"total_commits":170,"total_committers":8,"mean_commits":21.25,"dds":0.6764705882352942,"last_synced_commit":"8afc5340a7c251969d3b590133f152d83ff3eafa"},"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TREEcg%2FLDES-Action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TREEcg%2FLDES-Action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TREEcg%2FLDES-Action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TREEcg%2FLDES-Action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TREEcg","download_url":"https://codeload.github.com/TREEcg/LDES-Action/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249722664,"owners_count":21315864,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["actions","github-actions","ldes","linked-data-event-streams"],"created_at":"2024-11-16T19:05:41.855Z","updated_at":"2025-04-19T15:09:37.466Z","avatar_url":"https://github.com/TREEcg.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LDES-Action\n![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/TREEcg/LDES-Action)\n\n`LDES-Action` is a GitHub Action that replicates a\n[Linked Data Event Stream](https://w3id.org/ldes/specification)\nor [tree:Collection](https://w3id.org/tree/specification) and republishes it on GitHub Pages.\n\n## Usage\n\nCreate a `.github/workflows/data.yaml` file in the repository where you want to fetch data. An example:\n\n```yaml\n# data.yaml\n\n# make workflow concurrent\nconcurrency: ci-${{ github.ref }}\n\n# trigger workflow:\non:\n  # - on push to branch 'main'\n  push:\n    branches:\n      - main\n  # - on schedule, every 30 minutes\n  schedule:\n    - cron: '*/30 * * * *'\n  # - manually \n  workflow_dispatch:\n\njobs:\n  scheduled:\n    runs-on: ubuntu-latest\n    steps:\n      # Check out the repository so it can read the files inside of it and do other operations\n      - name: Check out repo\n        uses: actions/checkout@v2\n      # Fetch dataset, write data to json, push data to the repo and setup GitHub Pages\n      - name: Fetch and write data\n        uses: TREEcg/LDES-Action@v2\n        with:\n          # url you want to fetch\n          url: 'https://smartdata.dev-vlaanderen.be/base/gemeente'\n          # output directory name \n          storage: 'output'\n```\n\nThe `TREEcg/LDES-Action` action will perform the following operations:\n1. fetch data from the provided `url`\n2. split and store the fetched data across turtle files in the `storage` directory\n3. commit and push all of the data to your repo\n4. deploy the data to GitHub Pages on branch `main`.\n\n## Inputs\n\n### `url`\n\nURL to a LDES or tree:Collection dataset from which you want to fetch data.\n\n### `storage`\n\nName of the output directory where the fetched data will be stored.\n\n### `gh_pages_url` (optional)\n\nURL where GitHub Pages will be deployed.  \nDefault: `http(s)://\u003cusername\u003e.github.io/\u003crepository\u003e or http(s)://\u003corganization\u003e.github.io/\u003crepository\u003e`\n\n### `fragmentation_strategy` (optional)\n\nFragmentation strategy that will be deployed.  \nDefault: `basic`  \npossibele values:\n- `subject-pages`: [LDES Subject Page Bucketizer documentation](https://github.com/TREEcg/bucketizers/tree/main/packages/bucketizer-subject-page)\n- `substring`: [LDES Substring Bucketizer documentation](https://github.com/TREEcg/bucketizers/tree/main/packages/bucketizer-substring)\n- `basic`: [LDES Basic Bucketizer documentation](https://github.com/TREEcg/bucketizers/tree/main/packages/bucketizer-basic)\n\n### `fragmentation_page_size` (optional)\n\nAmount of RDF objects that will be on a single page.  \nDefault: `'50'`\n\n### `datasource_strategy` (optional)\n\nDatasource strategy to use.  \nDefault: `ldes-client` (only one implemented at this point)\n\n### `property_path` (optional)\n\nProperty path to be used by bucketizers.\n\n### `stream_data` (optional)\n\nBoolean whether to stream the LDES members or the load them in memory.  \nDefault: `false`\n\n### `timeout` (optional)\n\nAmount of time in milliseconds to wait for the datasource to fetch data in a single run, after which the datasource (LDES Client) will be paused. Take in mind that a single job execution run is limited to [6 hours](https://docs.github.com/en/actions/learn-github-actions/usage-limits-billing-and-administration). As a safety it is currently recommended to keer timeout under 5 hours.  \nDefault: `3600000` (1 hour)\n\n## Outputs\n\n### `delta_bytes`\n\nA signed number describing the number of bytes that changed in this run.\n\n# Development\n## Test\nCreate a private `.env` file following this structure, with your wanted environment variables:\n\n```\nINPUT_URL=\"https://smartdata.dev-vlaanderen.be/base/gemeente\"\nINPUT_STORAGE=\"output\"\nINPUT_GIT_USERNAME=\"\u003cYOUR_GIT_USERNAME\u003e\"\nINPUT_GIT_EMAIL=\"\u003cYOUR_GIT_EMAIL\u003e\"\nINPUT_FRAGMENTATION_STRATEGY=\"alphabetical\"\nINPUT_FRAGMENTATION_PAGE_SIZE=\"100\"\nINPUT_DATASOURCE_STRATEGY=\"ldes-client\"\n```\n\nRun the code to test it and check the output folder.\n\n`npm run test`\n\n## Compile\nCompile this Node.js project into a single file (see [ncc](https://github.com/vercel/ncc)), this is needed if you want to use this as a GitHub Action:\n\n`npm run dist`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftreecg%2Fldes-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftreecg%2Fldes-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftreecg%2Fldes-action/lists"}