Skip to content

Commit

Permalink
chore: adjust site workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
quantizor committed Nov 20, 2024
1 parent d9dfda1 commit 55ef1a8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:

jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -17,13 +20,16 @@ jobs:
node-version-file: '.nvmrc'

- run: yarn --immutable
- run: yarn build && yarn release
- run: yarn build-site

- name: Setup site
uses: actions/configure-pages@v5

- name: Upload site
uses: actions/upload-pages-artifact@v3
with:
# generated during yarn changeset-publish
path: 'docs'

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4 # or specific "vX.X.X" version tag for this action
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,12 @@
"prepublish": "in-publish && npm run build && npm run release || not-in-publish",
"prebuild": "rimraf dist && mkdirp dist",
"build": "microbundle --tsconfig tsconfig.json -f cjs,umd index.cjs.tsx --name MarkdownToJSX --define process.env.NODE_ENV=production --globals react=React && microbundle --tsconfig tsconfig.json -f es,modern --name MarkdownToJSX --define process.env.NODE_ENV=production",
"release": "microbundle site.tsx -o docs -f iife --tsconfig tsconfig.site.json --define process.env.NODE_ENV=production --jsx React.createElement --external react,react-dom,styled-components,katex --globals react=React,react-dom=ReactDOM,styled-components=styled --no-pkg-main",
"build-site": "microbundle site.tsx -o docs -f iife --tsconfig tsconfig.site.json --define process.env.NODE_ENV=production --jsx React.createElement --external react,react-dom,styled-components,katex --globals react=React,react-dom=ReactDOM,styled-components=styled --no-pkg-main",
"dev": "microbundle watch site.tsx -o docs -f iife --tsconfig tsconfig.site.json --define process.env.NODE_ENV=development --jsx React.createElement --external react,react-dom,styled-components,katex --globals react=React,react-dom=ReactDOM,styled-components=styled --no-pkg-main",
"test": "jest --verbose",
"size": "size-limit",
"benchmark": "node benchmark.js",
"changeset-publish": "yarn build && yarn release && changeset publish"
"changeset-publish": "yarn build && changeset publish"
},
"size-limit": [
{
Expand Down

0 comments on commit 55ef1a8

Please sign in to comment.