JSON Library Upload #40
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: JSON Library Upload | |
on: | |
workflow_dispatch: | |
workflow_run: | |
workflows: ["JSON Library Sorter and Doc Gen"] | |
types: | |
- completed | |
jobs: | |
librarian: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Upload library to Cloudflare | |
uses: ryand56/r2-upload-action@latest | |
with: | |
r2-account-id: ${{ secrets.R2_ACCOUNT_ID }} | |
r2-access-key-id: ${{ secrets.R2_ACCESS_KEY_ID }} | |
r2-secret-access-key: ${{ secrets.R2_SECRET_ACCESS_KEY }} | |
r2-bucket: ${{ secrets.R2_BUCKET }} | |
source-dir: ./custom_components/battery_notes/data/ | |
destination-dir: ./ | |
- name: Cloudflare Purge Cache | |
uses: jakejarvis/[email protected] | |
env: | |
CLOUDFLARE_ZONE: ${{ secrets.CLOUDFLARE_ZONE }} | |
CLOUDFLARE_TOKEN: ${{ secrets.CLOUDFLARE_TOKEN }} | |
PURGE_URLS: '["https://battery-notes-data.codechimp.org/library.json"]' |