remnantchat/.github/workflows/deploy.yml

40 lines
1010 B
YAML
Raw Normal View History

2022-08-08 02:33:59 +00:00
name: Deploy to Github Pages
on:
push:
branches:
- main
workflow_dispatch:
jobs:
deployment:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
2022-08-08 02:33:59 +00:00
- name: Setup Node
uses: actions/setup-node@v4
2022-08-08 02:33:59 +00:00
with:
node-version: 18
2022-08-08 02:33:59 +00:00
cache: 'npm'
- name: Build
run: |
2023-08-08 02:12:28 +00:00
npm ci
2022-08-08 02:33:59 +00:00
npm run build
# NOTE: This is a compatibility shim needed for upgrading installed
# Chitchatter PWAs after the switch to Vite:
# https://github.com/jeremyckahn/chitchatter/commit/ea34058fa7ac2cbfd165837cdbef5caf6a9645ce#diff-639916bc14c3f311c31f629a2ec116292a4b2f64d06b3607b9ddd2e495703895
#
# TODO: Remove this cp operation after 9/1/2023.
cp dist/manifest.webmanifest dist/manifest.json
2022-08-08 02:33:59 +00:00
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
2022-08-08 02:33:59 +00:00
with:
deploy_key: ${{ secrets.DEPLOY_KEY }}
chore: Migrate from Create React App to Vite (#231) * chore(vite): use vite * fix(vite): alias lib directory * chore(vite): set type: module * chore: update vite and MUI * fix(vite): make MUI components load * fix: use node path resolution * chore(vite): add svg support * fix(vite): polyfill global * fix(vite): use import.meta * fix(vite): use correct svg module resolution * chore(vite): migrate to vitest * fix(vite): remove PUBLIC_URL * fix(tests): mock audio service * chore(deps): upgrade to react test library 14 * refactor(tests): simplify room test setup * refactor(tests): make Date.now() mockable * refactor(vite): remove bootstrap shim * chore(deps): drop react-scripts * chore(deps): remove source-map-explorer Source maps do not currently work with MUI and Vite: https://github.com/vitejs/vite/issues/15012 Because of this, source map utilities are currently removed. * refactor(vite): use TypeScript for Vite config * chore(actions): update actions config for new paths * fix(service-worker): use VITE_HOMEPAGE for service worker resolution * fix(vercel): use quotes for build command * fix(vite): use import.meta.env.MODE * fix(service-worker): use correct definition for publicUrl * feat(vite): use vite-plugin-pwa * fix(pwa): make update prompt work * fix(types): use vite/client types * docs(readme): update building instructions * refactor(vite): simplify theme loading workaround * refactor(vite): use manifest object * docs(readme): update tool references * chore(deps): run `npm audit fix` * fix(vite): make syntax highlighter work consistently See: https://github.com/react-syntax-highlighter/react-syntax-highlighter/issues/513 * fix(pwa): remove manifest.json references * refactor(deps): remove jest references * refactor(types): remove react-scripts reference * chore(deps): use TypeScript 5 * refactor(tests): improve persisted storage mocking
2024-03-13 02:44:43 +00:00
publish_dir: ./dist
force_orphan: true