Skip to content

andry81-devops/accum-content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 

Repository files navigation

GitHub views|any|total GitHub views|any|14d GitHub views|unique per day|total GitHub views|unique per day|14d

GitHub clones|any|total GitHub clones|any|14d GitHub clones|unique per day|total GitHub clones|unique per day|14d

donate


Tutorial to setup accumulation of various external statistic and content

Warning This tutorial does contain content related to not the GitHub itself.

All tutorials: https://github.com/andry81/index#tutorials

Features:

  1. Implementation can accumulate external inpage downloads counter, phpbb forum board view/replies counters, external content (svg files, images, etc) into a cache repository.

  2. The workflow does use a bash script to accumulate statistic for:

  3. Basically most of the scripts does accumulate the response. For example, the board viewes/replies accumulator script does accumulate statistic both into a single file: traffic/board/myboard/latest.json, and into a set of files grouped by year and allocated per day: traffic/board/myboard/by_year/YYYY/YYYY-MM-DD.json.

  4. You can directly point the statistic or the content cache as a standalone commits list: https://github.com/{{REPO_OWNER}}/{{REPO}}--gh-stats/commits/master/traffic/clones or https://github.com/{{REPO_OWNER}}/{{REPO}}--gh-content-cache/commits/master.

  5. All scripts does use GitHub composite action to reuse workflow code base: https://docs.github.com/en/actions/creating-actions/creating-a-composite-action

Warning Not all features of a generic GitHub action is supported: Known Issues

Repositories:

You need setup 2-5 repositories.

  1. Repository, where content config file will be stored: myrepo--gh-content-config.

    Note This repository is only required for the content accumulation script. This repository and a content store repository can be a single.

  2. Repository, where to store downloaded content: myrepo--gh-content-cache.

    Note This repository is only required for the content accumulation script. This repository and a content config repository can be a single.

    Features of a standalone content cache repository:
    https://github.com/andry81-devops/gh-action--accum-content#features-of-a-standalone-content-cache-repository

  3. Repository, where statistic will be saved: myrepo--gh-stats.

    Note This repository is only required for the statistic accumulation script.

  4. Repository, where to store github workflow support scripts: gh-workflow.
    You can fork or use it from here: https://github.com/andry81-devops/gh-workflow

  5. Repository, where to store github composite action:

    All action scripts:
    https://github.com/andry81/index#action-scripts

Note You need to attach a personal access token (PAT) into a repository used to run a GitHub action script (.github/workflows/*.yml) to read content from another repository and obtain the read permission from that repository: repo->public_repo.

Note You need to attach a personal access token (PAT) into a repository used to run a GitHub action script (.github/workflows/*.yml) to write content into another repository and obtain the push permission into that repository: repo.

Note A separate personal access token (PAT) does not require to be attached into a repository used to run a GitHub action script for another repository as long as that another repository is owned by the same owner as a repository which runs a GitHub action script.

  • myrepo--gh-content-config -> needs read access permission to read repository files
  • myrepo--gh-stats -> needs read/write access permissions to read/write repository files
  • myrepo--gh-content-cache -> needs read/write content permission to read/write repository files

To generate PAT: https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token

To attach PAT: https://docs.github.com/en/actions/reference/encrypted-secrets#creating-encrypted-secrets-for-a-repository

The myrepo-* repository should contain 1 file per statistic entity:

Warning You must replace all placeholder into respective values:

  • {{REPO_OWNER}} -> repository owner
  • {{REPO}} -> myrepo-*

After the github workflow yaml file is commited and pushed, you can run the action from the Actions tab in the myrepo-* repository.

Note See REUSE section for details if you have multiple repositories and want to store all GitHub workflow scripts (.github/workflows/*.yml) in a single repository.

Known Issues

https://github.com/andry81-devops/gh-known-issues#known-issues

Last known issues updates

https://github.com/andry81-devops/gh-known-issues#last-known-issues-updates

Releases

No releases published

Sponsor this project

Packages

No packages published