Skip to content

Multisite fixes (#97) #32

Multisite fixes (#97)

Multisite fixes (#97) #32

Workflow file for this run

name: Deploy
on:
push:
branches:
- main
- monorepo # TEMP
jobs:
cheerpj:
name: cheerpj.com/docs
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: 8
run_install: false
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: cd sites/cheerpj && pnpm install
- name: Build sites/cheerpj
run: cd sites/cheerpj && pnpm run build
# This is included by the CheerpJ.com WP theme
- name: Copy global-navbar include.html to dist
run: cp packages/global-navbar/include.html sites/cheerpj/dist/_global-navbar.html
- name: Deploy
uses: burnett01/rsync-deployments@7.0.1
with:
switches: -avzr --delete
path: sites/cheerpj/dist/
remote_path: ${{ secrets.RSYNC_DEPLOY_PATH }}
remote_host: ${{ secrets.RSYNC_DEPLOY_HOST }}
remote_port: ${{ secrets.RSYNC_DEPLOY_PORT }}
remote_user: ${{ secrets.RSYNC_DEPLOY_USER }}
remote_key: ${{ secrets.RSYNC_DEPLOY_KEY }}