Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release and Deploy mdTools v1.1.1 #69

Merged
merged 3 commits into from
Dec 11, 2024
Merged
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
70 changes: 70 additions & 0 deletions .github/workflows/gh-pages-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Deploy to GitHub Pages

on:
push:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: "18"

- name: Install Dependencies
run: npm install

- name: Build
run: npm run build

- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: build-output
path: docs
deploy:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Download build artifacts
uses: actions/download-artifact@v4
with:
name: build-output
path: docs

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs

- name: Create Tag
id: create_tag
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# Read version from package.json
version=$(node -p "require('./package.json').version")
version_tag="v$version"
echo "Version from package.json: $version_tag"
echo "version=$version_tag" >> $GITHUB_OUTPUT
git tag $version_tag
git push origin $version_tag

- name: Create GitHub Release
uses: ncipollo/release-action@v1
with:
tag: ${{ steps.create_tag.outputs.version }}
name: Release ${{ steps.create_tag.outputs.version }}
body: Automated release for version ${{ steps.create_tag.outputs.version }}.
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
20 changes: 10 additions & 10 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"title": "mdJSON Schema Viewer",
"name": "mdtools",
"description": "Visualize mdJSON schemas using D3.js",
"version": "1.1.0",
"version": "1.1.1",
"homepage": "https://github.com/adiwg/mdTools",
"repository": {
"type": "git",
Expand Down Expand Up @@ -33,11 +33,11 @@
"grunt-contrib-watch": "~1",
"grunt-env": "~0",
"grunt-preprocess": "~5",
"mdcodes": "2.9.0",
"mdjson-schemas": "2.9.0"
"mdcodes": "2.10.0",
"mdjson-schemas": "2.9.5"
},
"scripts": {
"build": "grunt prod",
"build": "npm install && grunt prod",
"deploy": "gh-pages -d docs",
"dev": "grunt dev",
"start": "grunt",
Expand Down
Loading