Skip to content

Commit 6407307

Browse files
ci: fix deployments of npm & deno branches (#3502)
1 parent 95dac43 commit 6407307

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

.github/workflows/deploy-artifact-as-branch.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ name: Deploy specified artifact as a branch
22
on:
33
workflow_call:
44
inputs:
5+
environment:
6+
required: true
7+
type: string
58
artifact_name:
69
required: true
710
type: string
@@ -13,6 +16,9 @@ on:
1316
type: string
1417
jobs:
1518
deploy-artifact-as-branch:
19+
environment:
20+
name: ${{ inputs.environment }}
21+
url: ${{ github.server_url }}/${{ github.repository }}/tree/${{ inputs.target_branch }}
1622
runs-on: ubuntu-latest
1723
steps:
1824
- name: Checkout `${{ inputs.target_branch }}` branch

.github/workflows/push.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,9 @@ jobs:
77
name: Deploy to `npm` branch
88
needs: ci
99
if: github.ref == 'refs/heads/main'
10-
environment:
11-
name: npm-branch
12-
url: https://github.com/graphql/graphql-js/tree/npm
1310
uses: ./.github/workflows/deploy-artifact-as-branch.yml
1411
with:
12+
environment: npm-branch
1513
artifact_name: npmDist
1614
target_branch: npm
1715
commit_message: "Deploy ${{github.event.workflow_run.head_sha}} to 'npm' branch"
@@ -20,11 +18,9 @@ jobs:
2018
name: Deploy to `deno` branch
2119
needs: ci
2220
if: github.ref == 'refs/heads/main'
23-
environment:
24-
name: deno-branch
25-
url: https://github.com/graphql/graphql-js/tree/deno
2621
uses: ./.github/workflows/deploy-artifact-as-branch.yml
2722
with:
23+
environment: deno-branch
2824
artifact_name: denoDist
2925
target_branch: deno
3026
commit_message: "Deploy ${{github.event.workflow_run.head_sha}} to 'deno' branch"

0 commit comments

Comments
 (0)