Skip to content

Update logo

Update logo #468

name: Deploy Website on Release
on:
repository_dispatch:
types: [electerm-release]
push:
branches: [ master ]
workflow_dispatch:
jobs:
check-skip-ci:
runs-on: ubuntu-latest
outputs:
should_skip: ${{ steps.check.outputs.should_skip }}
steps:
- id: check
name: Check if [skip ci] is in commit message
run: |
if echo "${{ github.event.head_commit.message || '' }}" | grep -i '\[skip ci\]'; then
echo "should_skip=true" >> $GITHUB_OUTPUT
else
echo "should_skip=false" >> $GITHUB_OUTPUT
fi
build-and-deploy:
runs-on: ubuntu-latest
needs: check-skip-ci
if: needs.check-skip-ci.outputs.should_skip != 'true'
# Required so the sync script can push the updated release data back.
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '24'
cache: 'npm'
- name: Install dependencies
run: npm i
- name: Build site
run: npm run b
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Deploy to Cloudflare Workers
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
# The action defaults to wrangler 3.90.0, which silently ignores
# assets.run_worker_first AND does not process src/static/_headers or
# src/static/_redirects (it uploads them as plain files, so /_headers
# was even publicly readable). v4 handles all three; run_worker_first
# as an array needs >= 4.20.0.
wranglerVersion: '4'
command: deploy