Skip to content

Commit

Permalink
g
Browse files Browse the repository at this point in the history
  • Loading branch information
klezm committed Oct 5, 2023
1 parent 929eb42 commit 0b1b5a4
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 6 deletions.
44 changes: 43 additions & 1 deletion .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,26 @@ on:
push:
branches:
- main
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
inputs:
script:
description: 'Yarn script to execute'
default: build:gh-pages


# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write


# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false


defaults:
Expand All @@ -29,7 +48,13 @@ jobs:
tree -L 4 -d -I .git
echo "::endgroup::"
yarn build:gh-pages
echo "::group::📦 Install"
yarn install # --frozen-lockfile
echo "::endgroup::"
echo "::group::🏗️ Build"
yarn ${{ github.event.inputs.script }}
echo "::endgroup::"
# yarn workspace @emoji-mart/website parcel build index.html --no-autoinstall --no-cache --public-url ./
BUILD_PATH="$(yarn -s workspace @emoji-mart/website exec -s pwd)/dist"
echo ">>>$BUILD_PATH<<<"
Expand All @@ -44,3 +69,20 @@ jobs:
# exclude_assets: '.github,.git,.devcontainer,.vscode'
# keep_files: true # Keep existing files in publish branch
# force_orphan: true # Remove previous commits from the publishing branch

# deploy:
# environment:
# name: github-pages
# url: ${{ steps.deployment.outputs.page_url }}
# runs-on: ubuntu-latest
# steps:
# - name: Setup Pages
# uses: actions/configure-pages@v3
# - name: Upload artifact
# uses: actions/upload-pages-artifact@v2
# with:
# # Upload entire repository
# path: '.'
# - name: Deploy to GitHub Pages
# id: deployment
# uses: actions/deploy-pages@v2
5 changes: 0 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,14 @@
"build:data": "yarn workspace @emoji-mart/data build",
"build:react": "yarn workspace @emoji-mart/react build",
"build:website": "yarn workspace @emoji-mart/website build",

"build:gh-pages0": "yarn workspace @emoji-mart/website build-gh-pages",
"build:gh-pages": "yarn workspace @emoji-mart/website parcel build index.html --no-autoinstall --no-cache --public-url ./",
"build:gh-pages-v": "yarn workspace @emoji-mart/website build-gh-pages-v",

"check:types": "tsc",
"prettier": "prettier --check .",
"prettier:fix": "prettier --write .",
"test": "jest",
"start": "yarn install && yarn dev",

"start-vite": "yarn add -O --ignore-workspace-root-check vite && yarn install && yarn workspace @emoji-mart/website vite preview",
"start-vite0": "yarn add -O --ignore-workspace-root-check vite && yarn install && cd packages/emoji-mart-website/ && vite preview",
"_start-vite1": "yarn add -O --ignore-workspace-root-check vite && yarn install && vite",
Expand All @@ -34,13 +31,11 @@
"_vite1": "yarn vite --base /workspaces/emoji-mart/packages/emoji-mart-website/ --mode dev",
"_vite2": "yarn vite --base /workspaces/emoji-mart/packages/emoji-mart-website/emoji-mart/ --mode dev",
"_vite3": "yarn vite --base /workspaces/emoji-mart/packages/emoji-mart-website/dist/ --mode dev",

"serve-html": "npx -w @emoji-mart/website http-server dist/",
"serve-html:w": "yarn workspace @emoji-mart/website serve-html",
"serve-html:w0": "yarn workspace @emoji-mart/website serve-html dist",
"serve-html:w1": "cd packages/emoji-mart-website/dist/ && pwd && ls -lha && npx http-server dist",
"serve-html-s": "cd packages/emoji-mart-website/dist/ && npx serve ./",

"clean": "rm -rf .parcel-cache; rm -rf packages/emoji-mart-website/dist; rm -rf packages/emoji-mart-website/public",
"updatePath0": "sed -i -- 's/files/.\\//g' dist/files/*.css",
"updatePath1": "sed -i.bak 's/replacethislinewithadot/./g' dist/index.html",
Expand Down

0 comments on commit 0b1b5a4

Please sign in to comment.