-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (35 loc) · 1.49 KB
/
push-notebooks.yaml
File metadata and controls
35 lines (35 loc) · 1.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# Copy workflow to workspace for notebook publishing, update as needed
name: push-notebooks
on:
push:
branches:
- main
paths:
- "*.ipynb"
- "*.py"
- .github/workflows/push-notebooks.yaml
# Remove the following paths and add any external dependencies in workspace
- .github/actions/publish-notebook/action.yaml
- "**/README.md"
concurrency: push-notebooks
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Publish Jupyter notebooks
uses: okkema/notes/.github/actions/publish-notebook@main # Pin this to a release, i.e. "0.1.0"
with:
account_id: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
r2_access_key: ${{ secrets.CLOUDFLARE_R2_ACCESS_KEY }}
r2_secret_key: ${{ secrets.CLOUDFLARE_R2_SECRET_KEY }}
r2_bucket: ${{ secrets.CLOUDFLARE_R2_BUCKET }}
visibility: public # Default is "private"
# source_dir: public # Default it "dist"
# destination_dir: workspace-name
# notebooks: results.ipynb # Separate with spaces and/or use globs. Default is "*.ipynb"
# prebuild: |
# # Download data and include it in source directory to be published along side notebooks
# curl -H "Authorization: Bearer $SUPER_SECRET" https://api.example.com/feed.json -o public/feed.json
# hide_code: true # Hide code blocks
# env: # Environment variables can used prebuild script and notebook execution
# SUPER_SECRET: ${{ secrets.SUPER_SECRET }}