DamienD
Deno14mo ago
Damien

Help setting up deno deploy github action for deno 2.0

I had just written out a help message and then at the last minute I figured out the issue.

Building my fresh website locally with
nodeModulesDir: "auto"
works fine because I am using Deno 2.0.2 however the Github action I have (setup by Deno and not myself) is using v1 in all of the places it mentions Deno.

name: Deploy
on:
  push:
    branches: main
  pull_request:
    branches: main

jobs:
  deploy:
    name: Deploy
    runs-on: ubuntu-latest

    permissions:
      id-token: write # Needed for auth with Deno Deploy
      contents: read # Needed to clone the repository

    steps:
      - name: Clone repository
        uses: actions/checkout@v4

      - name: Install Deno
        uses: denoland/setup-deno@v1
        with:
          deno-version: v1.x

      - name: Build step
        run: "deno task build"

      - name: Upload to Deno Deploy
        uses: denoland/deployctl@v1
        with:
          project: "damiensedgwick-my-website"
          entrypoint: "main.ts"
          root: "."


Is there an updated version of this action that I can use to enabled 2.0 deployments on push?
Was this page helpful?