Damien
Damien5mo ago

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: "."
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?
1 Reply
Damien
DamienOP5mo ago
For additional context, when I created the project I did so only after installing deno 2.0 so I am unsure why the Github action was created this way to begin with. Never mind, found it here: https://docs.deno.com/deploy/manual/ci_github/

Did you find this page helpful?