-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.yml
More file actions
67 lines (67 loc) · 1.92 KB
/
action.yml
File metadata and controls
67 lines (67 loc) · 1.92 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
65
66
67
name: 'repo2wasm'
description: 'convert a GitHub repository into a Wasm-powered integrated development environment (IDE)'
branding:
icon: 'terminal'
color: 'purple'
inputs:
input:
description: The name of the input directory to use.
default: "."
forgiving:
description: Ignore package version.
default: false
ide:
description: The IDE to configure.
default: jupyterlab
output:
description: The name of the output directory to use.
default: gh-pages
pages:
description: Enable publishing IDE to GitHub Actions.
default: true
python_version:
description: Version of Python to use.
default: "3.13"
pixi_version:
description: Version of Pixi to use.
default: "v0.59.0"
runs:
using: "composite"
steps:
- uses: actions/checkout@v6
- name: Install pixi
uses: prefix-dev/setup-pixi@v0.9.3
with:
pixi-version: ${{ inputs.pixi_version }}
cache: false
run-install: false
- name: Create Pixi environment
shell: bash
run: pixi init
- name: Install Python and micromamba
shell: bash
run: pixi add python=${{ inputs.python_version }} micromamba
- name: Install repo2wasm
shell: bash
run: pixi add --pypi repo2wasm
- name: Add task
shell: bash
run: pixi task add repo2wasm repo2wasm
- name: Create IDE
shell: bash
run: |
if [ "${{ inputs.forgiving }}" = "false" ]
then
export REPO2WASM_FORGIVING=""
else
export REPO2WASM_FORGIVING="--forgiving"
fi
pixi run repo2wasm $REPO2WASM_FORGIVING --no-run --ide "${{ inputs.ide }}" --output-dir "${{ inputs.output }}" "${{ inputs.input }}"
- name: Upload artifact to GitHub
if: inputs.pages
uses: actions/upload-pages-artifact@v4
with:
path: ${{ inputs.output }}
- name: Publish GitHub pages
if: inputs.pages
uses: actions/deploy-pages@v4