Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/deploy-artifact-as-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ name: Deploy specified artifact as a branch
on:
workflow_call:
inputs:
environment:
required: true
type: string
artifact_name:
required: true
type: string
Expand All @@ -13,6 +16,9 @@ on:
type: string
jobs:
deploy-artifact-as-branch:
environment:
name: ${{ inputs.environment }}
url: ${{ github.server_url }}/${{ github.repository }}/tree/${{ inputs.target_branch }}
runs-on: ubuntu-latest
steps:
- name: Checkout `${{ inputs.target_branch }}` branch
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@ jobs:
name: Deploy to `npm` branch
needs: ci
if: github.ref == 'refs/heads/main'
environment:
name: npm-branch
url: https://github.com/graphql/graphql-js/tree/npm
uses: ./.github/workflows/deploy-artifact-as-branch.yml
with:
environment: npm-branch
artifact_name: npmDist
target_branch: npm
commit_message: "Deploy ${{github.event.workflow_run.head_sha}} to 'npm' branch"
Expand All @@ -20,11 +18,9 @@ jobs:
name: Deploy to `deno` branch
needs: ci
if: github.ref == 'refs/heads/main'
environment:
name: deno-branch
url: https://github.com/graphql/graphql-js/tree/deno
uses: ./.github/workflows/deploy-artifact-as-branch.yml
with:
environment: deno-branch
artifact_name: denoDist
target_branch: deno
commit_message: "Deploy ${{github.event.workflow_run.head_sha}} to 'deno' branch"