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

Update package repo #452

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
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
64 changes: 1 addition & 63 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 @@ -59,65 +59,3 @@ jobs:
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

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "2.0.0",
"private": false,
"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 +70,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