All checks were successful
Documentation / Build and Deploy Documentation (pull_request) Successful in 1m6s
Release Docker Image / define-variables (pull_request) Successful in 3s
Checks / Prek / Pre-commit & Formatting (pull_request) Successful in 1m46s
Deploy Element Web / 🏗️ Build and Deploy (pull_request) Successful in 7m57s
Checks / Prek / Clippy and Cargo Tests (pull_request) Successful in 10m41s
Release Docker Image / build-image (linux/amd64, release, linux-amd64, base) (pull_request) Successful in 10m50s
Release Docker Image / build-image (linux/arm64, release, linux-arm64, base) (pull_request) Successful in 9m53s
Release Docker Image / merge (pull_request) Successful in 10s
Documentation / Build and Deploy Documentation (push) Successful in 56s
Release Docker Image / define-variables (push) Successful in 4s
Checks / Prek / Pre-commit & Formatting (push) Successful in 1m42s
Maintenance / Renovate / Renovate (push) Successful in 3m10s
Deploy Element Web / 🏗️ Build and Deploy (push) Successful in 4m56s
Checks / Prek / Clippy and Cargo Tests (push) Successful in 6m42s
Release Docker Image / build-image (linux/amd64, release, linux-amd64, base) (push) Successful in 5m13s
Release Docker Image / build-image (linux/arm64, release, linux-arm64, base) (push) Successful in 6m35s
Release Docker Image / merge (push) Successful in 9s
Follow-on to correct #1009. The previous fix downgraded upload-artifact to v3 but kept download-artifact@v4, creating incompatible storage formats that prevented artifact pattern filtering from working. Update all upload-artifact actions to v4 and adjust renovate configuration to disable automatic updates for forgejo artifact actions to maintain version consistency.
132 lines
3.9 KiB
YAML
132 lines
3.9 KiB
YAML
name: Deploy Element Web
|
|
|
|
on:
|
|
schedule:
|
|
- cron: "0 0 * * *"
|
|
workflow_dispatch:
|
|
pull_request:
|
|
paths:
|
|
- ".forgejo/workflows/element.yml"
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- ".forgejo/workflows/element.yml"
|
|
|
|
concurrency:
|
|
group: "element-${{ github.ref }}"
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
build-and-deploy:
|
|
name: 🏗️ Build and Deploy
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: 📦 Setup Node.js
|
|
uses: https://github.com/actions/setup-node@v5
|
|
with:
|
|
node-version: "22"
|
|
|
|
- name: 🔨 Clone, setup, and build Element Web
|
|
run: |
|
|
echo "Cloning Element Web..."
|
|
git clone https://github.com/maunium/element-web
|
|
cd element-web
|
|
git checkout develop
|
|
git pull
|
|
|
|
echo "Cloning matrix-js-sdk..."
|
|
git clone https://github.com/matrix-org/matrix-js-sdk.git
|
|
|
|
echo "Installing Yarn..."
|
|
npm install -g yarn
|
|
|
|
echo "Installing dependencies..."
|
|
yarn install
|
|
|
|
echo "Preparing build environment..."
|
|
mkdir -p .home
|
|
|
|
echo "Cleaning up specific node_modules paths..."
|
|
rm -rf node_modules/@types/eslint-scope/ matrix-*-sdk/node_modules/@types/eslint-scope || echo "Cleanup paths not found, continuing."
|
|
|
|
echo "Getting matrix-js-sdk commit hash..."
|
|
cd matrix-js-sdk
|
|
jsver=$(git rev-parse HEAD)
|
|
jsver=${jsver:0:12}
|
|
cd ..
|
|
echo "matrix-js-sdk version hash: $jsver"
|
|
|
|
echo "Getting element-web commit hash..."
|
|
ver=$(git rev-parse HEAD)
|
|
ver=${ver:0:12}
|
|
echo "element-web version hash: $ver"
|
|
|
|
chmod +x ./build-sh
|
|
|
|
export VERSION="$ver-js-$jsver"
|
|
echo "Building Element Web version: $VERSION"
|
|
./build-sh
|
|
|
|
echo "Checking for build output..."
|
|
ls -la webapp/
|
|
|
|
- name: ⚙️ Create config.json
|
|
run: |
|
|
cat <<EOF > ./element-web/webapp/config.json
|
|
{
|
|
"default_server_name": "continuwuity.org",
|
|
"default_server_config": {
|
|
"m.homeserver": {
|
|
"base_url": "https://matrix.continuwuity.org"
|
|
}
|
|
},
|
|
"default_country_code": "GB",
|
|
"default_theme": "dark",
|
|
"mobile_guide_toast": false,
|
|
"show_labs_settings": true,
|
|
"room_directory": [
|
|
"continuwuity.org",
|
|
"matrixrooms.info"
|
|
],
|
|
"settings_defaults": {
|
|
"UIFeature.urlPreviews": true,
|
|
"UIFeature.feedback": false,
|
|
"UIFeature.voip": false,
|
|
"UIFeature.shareQrCode": false,
|
|
"UIFeature.shareSocial": false,
|
|
"UIFeature.locationSharing": false,
|
|
"enableSyntaxHighlightLanguageDetection": true
|
|
},
|
|
"features": {
|
|
"feature_pinning": true,
|
|
"feature_custom_themes": true
|
|
}
|
|
}
|
|
EOF
|
|
echo "Created ./element-web/webapp/config.json"
|
|
cat ./element-web/webapp/config.json
|
|
|
|
- name: 📤 Upload Artifact
|
|
uses: forgejo/upload-artifact@v4
|
|
with:
|
|
name: element-web
|
|
path: ./element-web/webapp/
|
|
retention-days: 14
|
|
|
|
- name: 🛠️ Install Wrangler
|
|
run: npm install --save-dev wrangler@latest
|
|
|
|
- name: 🚀 Deploy to Cloudflare Pages
|
|
if: vars.CLOUDFLARE_PROJECT_NAME != ''
|
|
id: deploy
|
|
uses: https://github.com/cloudflare/wrangler-action@v3
|
|
with:
|
|
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
|
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
|
command: >-
|
|
pages deploy ./element-web/webapp
|
|
--branch="${{ github.ref == 'refs/heads/main' && 'main' || github.head_ref || github.ref_name }}"
|
|
--commit-dirty=true
|
|
--project-name="${{ vars.CLOUDFLARE_PROJECT_NAME }}-element"
|