-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use DENO_DEPLOYMENT_ID in github action??? #149
Comments
Yes, after the deployment is complete, the deployctl action set the deployment ID so you can use it later. name: Deploy
on: [push]
jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- name: Clone repository
uses: actions/checkout@v3
- name: Upload to Deno Deploy
uses: denoland/deployctl@v1
with:
project: "my-awesome-project"
entrypoint: "./main.ts" then we can access the deployment_id via name: Deploy
on: [push]
jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- name: Clone repository
uses: actions/checkout@v3
- name: Upload to Deno Deploy
+ id: deploy
uses: denoland/deployctl@v1
with:
project: "my-awesome-project"
entrypoint: "./main.ts"
+
+ - name: print deployment_id
+ run: echo ${{ steps.deploy.outputs.deployment-id }} Hope it helps :) |
@magurotuna thank you very much, that's perfect! I want to include the deployment url in the slack message. Does it return the project name as well? In my slack ping I can do:
But if it returns the project name I'd like to use it, or indeed, the url itself. Tried a few that were logical but, nothing worked. 😸 |
Right, figured it out. This works:
Doing this, gave me hints:
|
Wrote up a gist to give a bit more context, and share the deploy.yml file I ended up with, that includes the deployment url in the slack ping: https://gist.github.com/RickCogley/d4246b9f2817a401f0943149c255697d |
Hi - is there a way to get DENO_DEPLOYMENT_ID so that it can be used in a later step in a GH workflow?
I'm trying this sort of thing:
The text was updated successfully, but these errors were encountered: