-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Parajuli Kiran <[email protected]>
- Loading branch information
1 parent
0504e72
commit ebf66de
Showing
5 changed files
with
78 additions
and
11 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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
on: | ||
push: | ||
branches: | ||
- 'main' | ||
paths: | ||
- 'lib/**' | ||
- 'demo/**' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Cancel previous runs | ||
uses: styfle/[email protected] | ||
with: | ||
all_but_latest: true | ||
access_token: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Setup NodeJS | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '20.x.x' | ||
- name: Setup PNPM | ||
uses: pnpm/action-setup@v2 | ||
with: | ||
version: 'latest' | ||
run_install: | | ||
- recursive: true | ||
args: [--frozen-lockfile, --strict-peer-dependencies] | ||
- name: Build | ||
run: bash -x build_docs.sh | ||
|
||
|
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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/usr/bin/env sh | ||
|
||
# This file is used to build and deploy the docs to the dist branch | ||
|
||
DIST_BRANCH="dist" | ||
BASE_DIR="/home/runner/work/htmlmark" | ||
|
||
git stash && git stash clear | ||
|
||
echo "Building Started...." | ||
pnpm build | ||
echo "Building Completed." | ||
|
||
|
||
echo "Deploying Started...." | ||
mkdir -p "${BASE_DIR}""/temp" | ||
mv dist "${BASE_DIR}""/temp" | ||
rm -rf dist | ||
|
||
git fetch origin ${DIST_BRANCH} | ||
git checkout ${DIST_BRANCH} | ||
|
||
cp -r "${BASE_DIR}"/temp/dist/* . | ||
|
||
curr_date=$(date) | ||
|
||
if [ -n "$(git status --porcelain)" ]; then | ||
git add . | ||
git -c user.name="Kiran Parajuli" \ | ||
-c user.email="[email protected]" \ | ||
commit -m "Update the build code @ ""${curr_date}" | ||
git push origin ${DIST_BRANCH} | ||
fi | ||
|
||
rm -rf "${BASE_DIR}""/temp" | ||
echo "Deploying Docs Has Completed!" |
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
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
This file was deleted.
Oops, something went wrong.