51 lines
1.1 KiB
YAML
51 lines
1.1 KiB
YAML
name: Build and Deploy
|
|
|
|
on:
|
|
push:
|
|
branches: ["main", "master"]
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
env:
|
|
REGISTRY: git.rodydavis.dev
|
|
|
|
jobs:
|
|
build-and-deploy:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write
|
|
packages: write
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install pnpm
|
|
uses: pnpm/action-setup@v4
|
|
with:
|
|
version: 9.15.9
|
|
|
|
- name: Set up Bazel Environment
|
|
uses: https://git.rodydavis.dev/rodydavis/shared-actions/setup-bazel@main
|
|
with:
|
|
node_version: '24'
|
|
cache: 'pnpm'
|
|
|
|
- name: Install dependencies
|
|
run: pnpm install --no-frozen-lockfile
|
|
|
|
- name: Verify Hermetic Bazel Build
|
|
run: bazel build //...
|
|
|
|
- name: Build Site
|
|
run: pnpm run build --base=/rodydavis/lit-examples/
|
|
|
|
- name: Deploy Docs
|
|
uses: peaceiris/actions-gh-pages@v4
|
|
with:
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
force_orphan: true
|
|
publish_dir: dist
|