PR previews cleanup #501
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: PR previews cleanup | |
on: | |
schedule: | |
- cron: '0 1 * * *' # run daily at 01:00 am (UTC) | |
workflow_dispatch: | |
jobs: | |
previews-cleanup: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
repository-projects: write | |
concurrency: | |
group: gh-pages | |
env: | |
GH_TOKEN: ${{ github.token }} | |
REPO: ${{ github.repository }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/checkout@v3 | |
with: | |
ref: gh-pages | |
path: pages | |
- name: Remove outdated PR previews | |
run: | | |
./.github/previews_cleanup.sh | |
- name: Redeploy | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./pages | |
commit_message: "Remove outdated previews" | |
cname: www.chipsalliance.org |