Skip to content
This repository has been archived by the owner on Jul 8, 2023. It is now read-only.

Feat/add-license-field #455

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
68 changes: 3 additions & 65 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Simple workflow for deploying static content to GitHub Pages
name: Build, Test, npm Publish, and Deploy
name: Build, Test, npm Publish

on:
push:
Expand Down Expand Up @@ -41,7 +41,7 @@ jobs:
npm-publish:
runs-on: ubuntu-latest
needs: test
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/add-jest-to-vite'
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/publish'
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -55,69 +55,7 @@ jobs:
- name: Build
run: pnpm build
- name: Publish
uses: mikeal/merge-release@master
uses: mrcoder/merge-release@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}

# Build the site for embed view and other demo
build-site:
runs-on: ubuntu-latest
needs: test
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/add-jest-to-vite'
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: "18"
cache: pnpm
- name: Install dependencies
run: pnpm install
- name: Build the site for demo page and embed view
run: pnpm build:site
- name: Upload artifact for pages # upload zipped artifact named 'gh-pages' for actions/deploy-pages@v1
uses: actions/upload-pages-artifact@v1
with:
path: ./dist
- name: Upload artifact for embed view # upload unzipped artifact named 'zenuml-embed' for cpina/github-action-push-to-another-repository@main
uses: actions/upload-artifact@v3
with:
name: zenuml-embed
path: ./dist
# Single deploy job since we're just deploying
publish-to-gh-pages:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build-site
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1

push-to-zenuml-embed:
environment:
name: github-pages # use the same environment as publish-to-gh-pages on purpose
url: https://github.com/ZenUml/zenuml-embed
runs-on: ubuntu-latest
needs: build-site
steps:
- uses: actions/download-artifact@v3
with:
name: zenuml-embed
path: ./dist
- name: Pushes to another repository
uses: cpina/github-action-push-to-another-repository@main
env:
SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }}
with:
source-directory: './dist'
destination-github-username: 'zenuml'
destination-repository-name: 'zenuml-embed'
user-email: [email protected]
target-branch: main

7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{
"name": "@zenuml/core",
"version": "2.0.0",
"version": "3.0.0",
"private": false,
"license": "MIT",
"repository": {
"url": "https://github.com/ZenUml/core.git"
"url": "https://github.com/mermaid-js/zenuml-core"
},
"scripts": {
"dev": "vite dev --port 8080",
Expand Down Expand Up @@ -70,7 +71,7 @@
"eslint-plugin-vue": "^8.7.1",
"global-jsdom": "^8.6.0",
"jsdom": "^20.0.2",
"node-sass": "^6.0.0",
"node-sass": "^7.0.3",
"regenerator-runtime": "^0.13.7",
"sass": "^1.26.5",
"svg-url-loader": "^6.0.0",
Expand Down
Loading