Skip to content

Update dependency eslint to v9 #2095

Update dependency eslint to v9

Update dependency eslint to v9 #2095

Workflow file for this run

name: Deploy
on:
push:
permissions:
contents: read
jobs:
publish:
runs-on: ubuntu-latest
if: github.repository_owner == 'harryzcy'
permissions:
contents: read
deployments: write
name: Publish to Cloudflare Pages
steps:
- name: Harden Runner
uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.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@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
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@a08dc762e87e8754e0d56a16a35a70b406bc869f # v3.6.1
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"