-
Notifications
You must be signed in to change notification settings - Fork 116
64 lines (50 loc) · 2.25 KB
/
Copy pathdeploy.yml
File metadata and controls
64 lines (50 loc) · 2.25 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# This workflow builds and deploys marimo notebooks to GitHub Pages
# It runs automatically when changes are pushed to the main branch or can be triggered manually
name: Deploy to GitHub Pages
# Defines when the workflow will run
on:
push:
branches: ['main'] # Trigger on pushes to main branch
workflow_dispatch: # Allow manual triggering from the GitHub UI
# Concurrency settings to manage multiple workflow runs
concurrency:
group: 'pages' # Only one workflow in the 'pages' group can run at a time
cancel-in-progress: false # Don't cancel in-progress runs when a new one is triggered
# Environment variables used by the workflow
env:
UV_SYSTEM_PYTHON: 1 # Use system Python with uv package manager
jobs:
# The build job exports marimo notebooks to static HTML/WebAssembly
build:
runs-on: ubuntu-latest # Use the latest Ubuntu runner
steps:
# Check out the repository code
- uses: actions/checkout@v4
- name: Run the dryrun command
run: |
make dryrun
# Upload the generated site as an artifact for the deploy job
- name: 📤 Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: _site # Directory containing the built site
# The deploy job publishes the built site to GitHub Pages
deploy:
needs: build # This job depends on the build job completing successfully
# Required permissions for the GitHub Pages deployment
permissions:
pages: write # Permission to deploy to Pages
id-token: write # Permission to verify the deployment
# Configure the deployment environment
environment:
name: github-pages # Deploy to the github-pages environment
url: ${{ steps.deployment.outputs.page_url }} # Use the URL from the deployment step
runs-on: ubuntu-latest # Use the latest Ubuntu runner
steps:
# Deploy the site to GitHub Pages using the official action
- name: 🚀 Deploy to GitHub Pages
id: deployment # ID used to reference this step's outputs
uses: actions/deploy-pages@v4 # GitHub's official Pages deployment action
- name: Display address
run: |
echo ${{ steps.deployment.outputs.page_url }}