https://github.com/bcbi/cleanuppullrequestpreviews.jl
Automatically delete old pull request previews from Documenter, Franklin, etc.
https://github.com/bcbi/cleanuppullrequestpreviews.jl
Last synced: 4 months ago
JSON representation
Automatically delete old pull request previews from Documenter, Franklin, etc.
- Host: GitHub
- URL: https://github.com/bcbi/cleanuppullrequestpreviews.jl
- Owner: bcbi
- License: mit
- Created: 2020-07-18T00:06:20.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-07-22T00:08:42.000Z (about 6 years ago)
- Last Synced: 2025-03-27T23:23:24.913Z (over 1 year ago)
- Language: Julia
- Homepage:
- Size: 108 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CleanUpPullRequestPreviews
[](https://bcbi.github.io/CleanUpPullRequestPreviews.jl/stable)
[](https://bcbi.github.io/CleanUpPullRequestPreviews.jl/dev)
[](https://github.com/bcbi/CleanUpPullRequestPreviews.jl/actions)
[](https://codecov.io/gh/bcbi/CleanUpPullRequestPreviews.jl)
CleanUpPullRequestPreviews automatically deletes old pull request previews from Documenter, Franklin, etc.
## Example usage
### Step 1:
Create a file named `.ci/Project.toml` with the following contents:
```toml
[deps]
CleanUpPullRequestPreviews = "06c59129-2005-40e8-8e6e-18d91e04568a"
```
### Step 2:
Make sure that you have a deploy key with write permissions on `JuliaHealth/juliahealth.github.io-previews`, and the private key for this deploy key is available as a secret named `FRANKLIN_PRIV_PREVIEW`.
Create a file named `.github/workflows/CleanUpPullRequestPreviews.yml` with the following contents:
```yaml
name: CleanUpPullRequestPreviews
on:
schedule:
- cron: '00 00 * * *' # run one time per day
jobs:
CleanUpPullRequestPreviews:
runs-on: ubuntu-latest
steps:
- name: Install SSH Client (pull request previews)
uses: webfactory/ssh-agent@v0.2.0
with:
ssh-private-key: ${{ secrets.FRANKLIN_PRIV_PREVIEW }}
- run: julia --project=.ci/ -e 'using Pkg; Pkg.instantiate()'
- name: CleanUpPullRequestPreviews.remove_old_previews
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: julia -e 'using CleanUpPullRequestPreviews; CleanUpPullRequestPreviews.remove_old_previews(; repo_main = "JuliaHealth/juliahealth.github.io", repo_previews = "git@github.com:JuliaHealth/juliahealth.github.io-previews.git", repo_previews_branch = "gh-pages")'
```