Skip to content

chore(ci): integrate Cloudflare Pages action #79

chore(ci): integrate Cloudflare Pages action

chore(ci): integrate Cloudflare Pages action #79

Workflow file for this run

name: ci
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
targets: "wasm32-unknown-unknown,x86_64-unknown-linux-gnu"
- uses: Swatinem/rust-cache@v2
- uses: actions/setup-node@v4
name: Setup Node.js
with:
node-version: "20"
- name: Enable corepack
run: corepack enable
- name: Install wasm-pack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- name: Run tests
run: cargo test --workspace --exclude gb-wasm --target x86_64-unknown-linux-gnu
- name: Lint
run: cargo clippy --target wasm32-unknown-unknown
- name: Build WASM
working-directory: ./crates/gb-wasm
run: wasm-pack build --release --out-dir npm --target web
- name: Install dependencies for web app
working-directory: ./app/gameboy
run: corepack pnpm install --frozen-lockfile
- name: Build web app
working-directory: ./app/gameboy
run: corepack pnpm run build
- name: Publish to Cloudflare Pages
uses: cloudflare/pages-action@v1
permissions:

Check failure on line 59 in .github/workflows/ci.yml

View workflow run for this annotation

GitHub Actions / ci

Invalid workflow file

The workflow is not valid. .github/workflows/ci.yml (Line: 59, Col: 9): Unexpected value 'permissions'
contents: read
deployments: write
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: gbplay
directory: dist
workingDirectory: app/gameboy
wranglerVersion: "3"