Skip to content

Archive

Archive #7

Workflow file for this run

name: Archive
on:
workflow_dispatch:
schedule:
- cron: "30 8 7 */2 *"
jobs:
Archive:
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
steps:
- name: git clone main
uses: actions/checkout@v4
with:
fetch-depth: 0
path: 'analytics'
- name: git clone website
uses: actions/checkout@v4
with:
repository: 'buddhist-uni/buddhist-uni.github.io'
path: 'website'
fetch-depth: 0
- name: Google Authentication
uses: google-github-actions/auth@v2
id: auth
with:
project_id: ${{ secrets.G_PROJECT_ID }}
service_account: ${{ secrets.SERVICE_ACCOUNT }}
workload_identity_provider: ${{ secrets.G_IDENTITY_PROVIDER }}
- name: Install requirements.txt
run: pip install -r analytics/requirements.txt -r analytics/archive-requirements.txt
- name: Update the Website Data
run: |
cd website/scripts
python update_site_data.py
- name: Update the Archive
run: |
cd analytics
BING_WEBMASTER_API_KEY=${{ secrets.BING_WEBMASTER_API_KEY }} GA4_PROPERTY_ID=${{ secrets.GA4_PROPERTY_ID }} python archive.py
- name: Commit the Changes
uses: EndBug/add-and-commit@v9
with:
cwd: './analytics'
add: 'data'
message: "Bump the archive (automated commit)"
push: true