Skip to content

Commit

Permalink
Issue 2 (#3)
Browse files Browse the repository at this point in the history
Feat: Implements #2 

---------

Co-authored-by: Tobias Heß <[email protected]>
  • Loading branch information
Ateyu and Tobias Heß authored Oct 9, 2024
1 parent c1ad54b commit 8c22aba
Show file tree
Hide file tree
Showing 41 changed files with 7,664 additions and 9 deletions.
41 changes: 32 additions & 9 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs

name: Node.js CI
name: CI/CD

on:
workflow_dispatch:
push:
branches: [ "*" ]
pull_request:
branches: [ "main" ]
branches: [ "nightly", "stable", "main" ]

jobs:
build:
Expand All @@ -28,12 +28,35 @@ jobs:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci
- run: npm run build --if-present
# - run: npm test TODO: See #issue-4
- run: npm run build
- run: npm run test
- name: Archive production artifacts
uses: actions/upload-artifact@v4
uses: actions/upload-pages-artifact@v3
with:
name: dist-without-markdown
path: |
dist
!dist/**/*.md
name: github-pages
path: dist

deploy:

# FIXME: Change me to stable when ready
if: github.ref == 'refs/heads/nightly'

# Add a dependency to the build job
needs: build

# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source

# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

# Specify runner + deployment step
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
12 changes: 12 additions & 0 deletions dist/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!doctype html>
<html lang="en">
<head>
<title>Editor</title>
<meta charset=utf8>
</head>
<body>
<h1>Editor</h1>
<script src="../src/editor.bundle.js"></script>
<code-mirror-editor></code-mirror-editor>
</body>
</html>
12 changes: 12 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!doctype html>
<html lang="en">
<head>
<title>Editor</title>
<meta charset=utf8>
</head>
<body>
<h1>Editor</h1>
<script src="src/editor.bundle.js"></script>
<code-mirror-editor></code-mirror-editor>
</body>
</html>
Loading

0 comments on commit 8c22aba

Please sign in to comment.