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:
|
2023-10-29 19:49:49 +00:00
|
|
|
- uses: actions/checkout@v4
|
2022-08-08 02:33:59 +00:00
|
|
|
|
|
|
|
- name: Setup Node
|
2023-10-29 19:49:49 +00:00
|
|
|
uses: actions/setup-node@v4
|
2022-08-08 02:33:59 +00:00
|
|
|
with:
|
2023-07-02 02:48:35 +00:00
|
|
|
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
|
2024-03-13 12:16:12 +00:00
|
|
|
# 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
|
2022-08-08 02:42:51 +00:00
|
|
|
uses: peaceiris/actions-gh-pages@v3
|
2022-08-08 02:33:59 +00:00
|
|
|
with:
|
2022-08-08 02:42:51 +00:00
|
|
|
deploy_key: ${{ secrets.DEPLOY_KEY }}
|
2024-03-13 02:44:43 +00:00
|
|
|
publish_dir: ./dist
|
2022-08-08 02:42:51 +00:00
|
|
|
force_orphan: true
|