Skip to content

fix: deploy

fix: deploy #8

Workflow file for this run

name: Deploy Apps
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
strategy:
matrix:
app:
- email
- core-connection
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 20
cache: 'npm'
- name: Install dependencies and build
run: |
cd examples/${{ matrix.app }}
npm install
npm run build
mkdir -p ../../gh-pages/${{ matrix.app }}
cp -R dist/* ../../gh-pages/${{ matrix.app }}
- name: Checkout existing gh-pages
uses: actions/checkout@v3
with:
ref: gh-pages
path: gh-pages-existing
- name: Merge new builds with existing
run: |
cp -R gh-pages-existing/* gh-pages || true
cp -R gh-pages/* gh-pages-existing
mv gh-pages-existing gh-pages
- name: Deploy to GitHub Pages
if: ${{ matrix.app == 'core-connection' }} # Deploy after the last app
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: gh-pages