Skip to content

Commit

Permalink
Merge pull request #91 from melange-re/playground/deploy
Browse files Browse the repository at this point in the history
playground: deploy
  • Loading branch information
jchavarri committed Aug 15, 2023
1 parent 42977c7 commit 242d7ac
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 11 deletions.
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
4 changes: 2 additions & 2 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ nav:
- Reference:
- API: api.md
- Try:
- Playground: try.md
- Talk:
- Playground: playground
- About:
- Community: community.md

extra_css:
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: "./",
});

0 comments on commit 242d7ac

Please sign in to comment.