remnantchat/.github/workflows/deploy.yml
Jeremy Kahn 520b863f2a fix(pwa): add upgrade compatibility shim
This is needed to fix automatic PWA updates after ea34058fa7
2024-03-13 07:16:12 -05:00

40 lines
1010 B
YAML

name: Deploy to Github Pages
on:
push:
branches:
- main
workflow_dispatch:
jobs:
deployment:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 18
cache: 'npm'
- name: Build
run: |
npm ci
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
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
deploy_key: ${{ secrets.DEPLOY_KEY }}
publish_dir: ./dist
force_orphan: true