Element Web build fixes
Some checks failed
Documentation / Build and Deploy Documentation (push) Has been skipped
Checks / Prefligit / prefligit (push) Failing after 23s
Release Docker Image / define-variables (push) Failing after 5s
Release Docker Image / build-image (linux/amd64, release, linux-amd64, base) (push) Has been skipped
Release Docker Image / build-image (linux/arm64, release, linux-arm64, base) (push) Has been skipped
Release Docker Image / merge (push) Has been skipped
Checks / Rust / Format (push) Failing after 11s
Checks / Rust / Clippy (push) Failing after 17s
Checks / Rust / Cargo Test (push) Failing after 15s

This commit is contained in:
Tom Foster 2025-07-03 22:26:02 +01:00
parent 293e7243b3
commit 7e406445d4

View file

@ -11,16 +11,16 @@ concurrency:
jobs: jobs:
build-and-deploy: build-and-deploy:
name: Build and Deploy Element Web name: 🏗️ Build and Deploy
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Setup Node.js - name: 📦 Setup Node.js
uses: https://code.forgejo.org/actions/setup-node@v4 uses: https://github.com/actions/setup-node@v4
with: with:
node-version: "20" node-version: "22"
- name: Clone, setup, and build Element Web - name: 🔨 Clone, setup, and build Element Web
run: | run: |
echo "Cloning Element Web..." echo "Cloning Element Web..."
git clone https://github.com/maunium/element-web git clone https://github.com/maunium/element-web
@ -64,7 +64,7 @@ jobs:
echo "Checking for build output..." echo "Checking for build output..."
ls -la webapp/ ls -la webapp/
- name: Create config.json - name: ⚙️ Create config.json
run: | run: |
cat <<EOF > ./element-web/webapp/config.json cat <<EOF > ./element-web/webapp/config.json
{ {
@ -100,28 +100,25 @@ jobs:
echo "Created ./element-web/webapp/config.json" echo "Created ./element-web/webapp/config.json"
cat ./element-web/webapp/config.json cat ./element-web/webapp/config.json
- name: Upload Artifact - name: 📤 Upload Artifact
uses: https://code.forgejo.org/actions/upload-artifact@v3 uses: https://code.forgejo.org/actions/upload-artifact@v3
with: with:
name: element-web name: element-web
path: ./element-web/webapp/ path: ./element-web/webapp/
retention-days: 14 retention-days: 14
- name: Install Wrangler - name: 🛠️ Install Wrangler
run: npm install --save-dev wrangler@latest run: npm install --save-dev wrangler@latest
- name: Deploy to Cloudflare Pages (Production) - name: 🚀 Deploy to Cloudflare Pages
if: github.ref == 'refs/heads/main' && vars.CLOUDFLARE_PROJECT_NAME != '' if: vars.CLOUDFLARE_PROJECT_NAME != ''
id: deploy
uses: https://github.com/cloudflare/wrangler-action@v3 uses: https://github.com/cloudflare/wrangler-action@v3
with: with:
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
command: pages deploy ./element-web/webapp --branch="main" --commit-dirty=true --project-name="${{ vars.CLOUDFLARE_PROJECT_NAME }}-element" command: >-
pages deploy ./element-web/webapp
- name: Deploy to Cloudflare Pages (Preview) --branch="${{ github.ref == 'refs/heads/main' && 'main' || github.head_ref || github.ref_name }}"
if: github.ref != 'refs/heads/main' && vars.CLOUDFLARE_PROJECT_NAME != '' --commit-dirty=true
uses: https://github.com/cloudflare/wrangler-action@v3 --project-name="${{ vars.CLOUDFLARE_PROJECT_NAME }}-element"
with:
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
command: pages deploy ./element-web/webapp --branch="${{ github.head_ref || github.ref_name }}" --commit-dirty=true --project-name="${{ vars.CLOUDFLARE_PROJECT_NAME }}-element"