Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

playground: deploy #91

Merged
merged 5 commits into from
Jul 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ jobs:
with:
python-version: 3.x
- run: python3 -m pip install -r ./pip-requirements.txt
- uses: ocaml/setup-ocaml@v2
with:
ocaml-compiler: 4.14.x
dune-cache: true
- name: Build playground
run: make build-playground
- name: Configure Git user
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/publish-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ jobs:
with:
python-version: 3.x
- run: python3 -m pip install -r ./pip-requirements.txt
- uses: ocaml/setup-ocaml@v2
with:
ocaml-compiler: 4.14.x
dune-cache: true
- name: Build playground
run: make build-playground
- name: Configure Git user
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ _build
_opam
.vscode
.DS_Store

docs/playground
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,8 @@ format: ## Format the codebase with ocamlformat
.PHONY: format-check
format-check: ## Checks if format is correct
$(DUNE) build @fmt

.PHONY: build-playground
build-playground: install ## Builds the playground
$(DUNE) build @playground-assets
cd playground && yarn && yarn build
2 changes: 1 addition & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ nav:
- Reference:
- API: api.md
- Try:
- Playground: try.md
- Playground: playground
- About:
- Community: community.md
- Roadmap: roadmap.md
Expand Down
6 changes: 0 additions & 6 deletions playground/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,3 @@ cd playground && yarn dev
```

To build, `yarn build`.

## TODO

* Documentation
* Tests
* Themeability
2 changes: 1 addition & 1 deletion playground/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<!-- Example of public static images -->
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + React</title>
<title>Melange Playground</title>
</head>
<body>
<div id="root"></div>
Expand Down
2 changes: 1 addition & 1 deletion playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"build": "vite build --emptyOutDir",
"preview": "vite preview"
},
"dependencies": {
Expand Down
6 changes: 5 additions & 1 deletion playground/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,9 @@ import react from "@vitejs/plugin-react";

// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()]
plugins: [react()],
build: {
outDir: "../docs/playground",
},
base: "./",
});