Skip to content

Commit

Permalink
Deploy playground to GitHub Pages
Browse files Browse the repository at this point in the history
  • Loading branch information
GarboMuffin committed Mar 16, 2024
1 parent e7332fc commit e5097da
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 14 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Deploy playground

on:
workflow_dispatch:
push:
branches: [develop]

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "deploy"
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install dependencies
run: npm ci
- name: Build playground
run: npm run build
- name: Build docs
run: npm run docs
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: ./dist/

deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
22 changes: 10 additions & 12 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
name: Node.js CI
name: CI

on:
push:
pull_request:

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
- run: npm ci
- run: npm run lint
- run: npm run build
- run: npm run test
- uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- run: npm ci
- run: npm run lint
- run: npm run build
- run: npm run test
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
"main": "./src/index.js",
"browser": "./src/index.js",
"scripts": {
"build": "npm run docs && webpack --progress --colors --bail",
"build": "webpack --progress --colors --bail",
"coverage": "tap ./test/{unit,integration}/*.js --coverage --coverage-report=lcov",
"docs": "exit 0 || jsdoc -c .jsdoc.json",
"docs": "jsdoc -c .jsdoc.json",
"i18n:src": "mkdirp translations/core && format-message extract --out-file translations/core/en.json src/extensions/**/index.js",
"i18n:push": "tx-push-src scratch-editor extensions translations/core/en.json",
"lint": "eslint .",
Expand Down

0 comments on commit e5097da

Please sign in to comment.