Skip to content

Update Node.js to v22.9.0 #3216

Update Node.js to v22.9.0

Update Node.js to v22.9.0 #3216

Workflow file for this run

name: Deploy
on:
push:
permissions:
contents: read
jobs:
publish:
runs-on: ubuntu-24.04
if: github.repository_owner == 'harryzcy'
permissions:
contents: read
deployments: write
name: Publish to Cloudflare Pages
steps:
- name: Harden Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
disable-sudo: true
egress-policy: block
allowed-endpoints: >
api.cloudflare.com:443
api.github.com:443
github.com:443
objects.githubusercontent.com:443
registry.npmjs.org:443
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
with:
node-version: 20
check-latest: true
- name: Extract branch name
shell: bash
run: |
if [[ "${GITHUB_REF}" =~ ^refs/tags/ ]]; then
echo "branch=main" >> "$GITHUB_OUTPUT"
else
echo "branch=${GITHUB_REF#refs/heads/}" >> "$GITHUB_OUTPUT"
fi
id: extract_branch
- name: Build
run: |
make build-cloudflare
- name: Publish to Cloudflare Pages
uses: cloudflare/wrangler-action@f84a562284fc78278ff9052435d9526f9c718361 # v3.7.0
if: ${{ github.actor != 'dependabot[bot]' }}
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: pages deploy --project-name mailbox-browser --branch ${{ steps.extract_branch.outputs.branch }} dist
workingDirectory: cloudflare
wranglerVersion: "3"