-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
68 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,63 +1,68 @@ | ||
# name: Release with Changelog, Build Demo, Deploy to Github Pages, Publish to NPM | ||
# # concat workflows because it is not easy to run trigger multiple. https://docs.github.com/en/actions/using-workflows/triggering-a-workflow#triggering-a-workflow-from-a-workflow | ||
# permissions: | ||
# contents: write | ||
# on: | ||
# push: | ||
# tags: | ||
# - "v*" | ||
|
||
# jobs: | ||
# build: | ||
# runs-on: ubuntu-latest | ||
|
||
# steps: | ||
# - name: Checkout Repository | ||
# uses: actions/checkout@v4 | ||
# with: | ||
# fetch-depth: 0 | ||
|
||
# - name: Set up Node.js | ||
# uses: actions/setup-node@v4 | ||
# with: | ||
# node-version: "20.x" | ||
# registry-url: "https://registry.npmjs.org" | ||
|
||
# - name: Install | ||
# run: npm install | ||
|
||
# - name: Release with Changelog | ||
# run: npx changelogithub # or changelogithub@0.12 if ensure the stable result | ||
# continue-on-error: true # failed when only tag pushed | ||
# env: | ||
# GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | ||
|
||
# - name: Build Demo | ||
# run: npm run build:web | ||
|
||
# - name: Extra Files | ||
# run: | | ||
# # Switch to the generated directory | ||
# cd dist | ||
|
||
# # Set custom domain for GitHub Pages | ||
# # echo "youdomain.com" > CNAME | ||
|
||
# # Required to bypass Jekyll on GitHub Pages | ||
# echo "" > .nojekyll | ||
|
||
# - name: Deploy | ||
# uses: JamesIves/github-pages-deploy-action@v4 | ||
# with: | ||
# single-commit: true | ||
# branch: gh-pages | ||
# clean: true | ||
# folder: dist | ||
# - name: Remove Dist | ||
# run: rm -rf dist | ||
# - name: Build Library | ||
# run: npm run build | ||
# - run: rm -rf node_modules && npm ci | ||
# - run: npm publish | ||
# env: | ||
# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
name: Release with Changelog, Build Docs, Deploy to Github Pages, Publish to NPM | ||
# concat workflows because it is not easy to run trigger multiple. https://docs.github.com/en/actions/using-workflows/triggering-a-workflow#triggering-a-workflow-from-a-workflow | ||
permissions: | ||
contents: write | ||
on: | ||
push: | ||
tags: | ||
- "v*" | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: "20.x" | ||
registry-url: "https://registry.npmjs.org" | ||
|
||
- name: Install | ||
run: npm install | ||
|
||
- name: Release with Changelog | ||
run: npx changelogithub # or changelogithub@0.12 if ensure the stable result | ||
continue-on-error: true # failed when only tag pushed | ||
env: | ||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | ||
|
||
- name: Build Demo | ||
run: npm run build:web | ||
- name: Build Docs | ||
run: npm run docs:build | ||
|
||
- name: Extra Files | ||
run: | | ||
# Switch to the generated directory | ||
cd docs/.vitepress/dist | ||
# cp demo to here | ||
cp ../../../dist v1-demo-windowed | ||
# Set custom domain for GitHub Pages | ||
echo "he-tree-react.phphe.com" > CNAME | ||
# Required to bypass Jekyll on GitHub Pages | ||
echo "" > .nojekyll | ||
- name: Deploy | ||
uses: JamesIves/github-pages-deploy-action@v4 | ||
with: | ||
single-commit: true | ||
branch: gh-pages | ||
clean: true | ||
folder: dist | ||
- name: Remove Dist | ||
run: rm -rf dist | ||
- name: Build Library | ||
run: npm run build | ||
- run: rm -rf node_modules && npm ci | ||
- run: npm publish | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |