Skip to content

Daily activity digests #239

Daily activity digests

Daily activity digests #239

Workflow file for this run

# This GitHub Action creates the dinghy digest and publishes them every day.
name: "Daily activity digests"
on:
push:
branches:
- "main"
schedule:
# every day at 6am SGT (10pm UTC)
- cron: "0 22 * * *"
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true
defaults:
run:
shell: bash
jobs:
digest:
name: "Daily digest"
runs-on: ubuntu-latest
environment: github-pages
steps:
- name: "Check out the repo"
uses: actions/checkout@v3
- name: "Install Python"
uses: actions/setup-python@v4
with:
python-version: "3.11"
check-latest: false
- name: "Install dinghy"
env:
# A personal access token with public_repo permission.
GITHUB_TOKEN: ${{ secrets.DINGHY_ACCESS_TOKEN }}
run: |
python -m pip install dinghy
# python -m pip install --use-pep517 git+https://github.com/nedbat/dinghy@main
- name: "Run dinghy"
env:
# A personal access token with public_repo permission.
GITHUB_TOKEN: ${{ secrets.DINGHY_ACCESS_TOKEN }}
run: |
mkdir -p digests/
python -m dinghy
- name: "Setup Pages"
uses: actions/configure-pages@v2
- name: "Upload artifact"
uses: actions/upload-pages-artifact@v1
with:
# Upload entire repository
path: "."
- name: "Deploy to GitHub Pages"
uses: actions/deploy-pages@v1