Files
sweet/.github/workflows/deploy.yml
T
Christian Svensson 2e68c30d8d ci: reduce workflow failures on forks (#3176)
Publishing packages workflow and deploying to Deno Deploy step runs even
for forks. This is annoying, since it creates some spam every push for
any open PR's.

This PR tries to address this, by skipping certain steps or workflows
unless the current GitHub org is `denoland`, which should be pretty safe
long term.

## Failed workflow spam

<img width="1396" height="635" alt="image"
src="https://github.com/user-attachments/assets/d939d1f5-e736-42a4-9355-f946b3d6ddf2"
/>

<img width="1577" height="905" alt="image"
src="https://github.com/user-attachments/assets/fbf7ffe3-2759-430a-a33e-c8de0d7e113c"
/>
2025-08-01 20:38:05 +02:00

38 lines
808 B
YAML

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@v2
with:
cache: true
- name: Build step
working-directory: ./www
run: "deno task build"
- name: Upload to Deno Deploy
uses: denoland/deployctl@v1
# Skip publishing for forks
if: github.repository_owner == 'denoland'
with:
project: "fresh"
entrypoint: "./www/_fresh/server.js"
root: "."