ci: switch to static site deployment via Gitea Pages
Build and Deploy / build-and-deploy (push) Failing after 54s

- Replaced Docker image build/push with static site publishing using peaceiris/actions-gh-pages.
- Updated Vite configuration to use /lit-examples/ as the base path.
- Enhanced mpaHtmlPlugin to correctly prefix assets with the base path in subfolders.
- Updated CI permissions to allow content writing for deployment.
This commit is contained in:
2026-05-17 20:31:15 -07:00
parent b6d4d53b50
commit 22a1020d15
2 changed files with 13 additions and 34 deletions
+7 -30
View File
@@ -15,7 +15,7 @@ jobs:
build-and-deploy:
runs-on: ubuntu-latest
permissions:
contents: read
contents: write
packages: write
steps:
@@ -43,34 +43,11 @@ jobs:
run: bazel build //...
- name: Build Site
run: pnpm run build
run: pnpm run build --base=/lit-examples/
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to registry
uses: docker/login-action@v4
- name: Deploy Docs
uses: peaceiris/actions-gh-pages@v4
with:
registry: ${{ env.REGISTRY }}
username: ${{ gitea.actor }}
password: ${{ secrets.GIT_TOKEN }}
- name: Get image metadata
id: meta
run: |
NAME=$(node -p "require('./package.json').name.toLowerCase()")
OWNER=$(echo "${{ gitea.actor }}" | tr '[:upper:]' '[:lower:]')
echo "name=${NAME}" >> $GITHUB_OUTPUT
echo "owner=${OWNER}" >> $GITHUB_OUTPUT
- name: Build and push image
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile
push: true
tags: |
${{ env.REGISTRY }}/${{ steps.meta.outputs.owner }}/${{ steps.meta.outputs.name }}:latest
${{ env.REGISTRY }}/${{ steps.meta.outputs.owner }}/${{ steps.meta.outputs.name }}:${{ github.sha }}
cache-from: type=gha
cache-to: type=gha,mode=max
github_token: ${{ secrets.GITHUB_TOKEN }}
force_orphan: true
publish_dir: dist