-
Notifications
You must be signed in to change notification settings - Fork 2
42 lines (39 loc) · 1.33 KB
/
deploy.yml
File metadata and controls
42 lines (39 loc) · 1.33 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
name: Deploy static site to GitHub Pages
on:
push:
branches:
- pyodide # Triggers the workflow on pushes to the pyodide branch
workflow_dispatch: # Allows manual triggering from the GitHub UI
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout your repository
uses: actions/checkout@v4
# Add steps to build your static site (e.g., npm run build)
- name: Run deployment script
run: |
export PYODIDE_VERSION=0.29.3
export TARGET_DIR=dist
./deploy_calculator.sh
- name: Upload artifact
# The contents of the 'build' directory will be uploaded as an artifact
uses: actions/upload-pages-artifact@v4
with:
path: 'dist/' # Change this to your build output directory (e.g., public, dist)
deploy:
# Add a dependency to the build job
needs: build
runs-on: ubuntu-latest
permissions:
pages: write # Grants the GITHUB_TOKEN the necessary permissions to deploy to GitHub Pages
id-token: write # Required for OIDC authentication
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4 # This action handles the deployment