Skip to content

Commit

Permalink
ci: fix deployments of npm & deno branches (#3502)
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanGoncharov committed Feb 16, 2022
1 parent 95dac43 commit 6407307
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/deploy-artifact-as-branch.yml
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
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"

0 comments on commit 6407307

Please sign in to comment.