Skip to content

fix: 배포 workflow 수정 #2

fix: 배포 workflow 수정

fix: 배포 workflow 수정 #2

name: Push branch & deploy On remote repository only for Vercel

Check failure on line 1 in .github/workflows/deploy-integration.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/deploy-integration.yml

Invalid workflow file

No steps defined in `steps` and no workflow called in `uses` for the following jobs: variable
on:
workflow_call:
inputs:
user_name:
description: 배포한 사용자
required: true
type: string
stage:
description: 배포 유형(production,develop)
required: true
type: string
secrets:
ACCESS_TOKEN:
required: true
env:
DEVELOP_REPOSITORY: deploy-sambad-develop
PRODUCTION_REPOSITORY: deploy-sambad
jobs:
variable:
name: set the target STAGE
runs-on: ubuntu-latest
outputs:
destination-repository: ${{inputs.stage == 'production' && env.PRODUCTION_REPOSITORY && env.DEVELOP_REPOSITORY}}
build:
needs: variable
runs-on: ubuntu-latest
container: pandoc/latex
outputs:
destination-repository: ${{needs.variable.outputs.destination-repository}}
target-branch: ${{steps.deploy-information.outputs.target-branch}}
steps:
- uses: actions/checkout@v4
- name: Install mustache (to update the date)
run: apk add ruby && gem install mustache
- name: creates ouput
run: sh ./tools/build.sh
- name: Pushes to another repository
uses: cpina/github-action-push-to-another-repository@main
env:
API_TOKEN_GITHUB: ${{ secrets.ACCESS_TOKEN }}
with:
source-directory: 'output'
destination-github-username: 'sambad-adventure'
destination-repository-name: ${{needs.variable.outputs.destination-repository}}
user-email: ${{secrets.EMAIL}}
commit-message: ${{github.event.commits[0].message}}
target-branch: ${{inputs.stage == 'prodction' && 'main' || 'main' }}
- name: get deploy information
id: deploy-information
run: echo "target-repository=${{needs.variable.outputs.destination-repository}}" >> "$GITHUB_OUTPUT" |
echo "target-branch=${{inputs.stage == 'prodction' && 'main' || 'main' }}" >> "$GITHUB_OUTPUT"
info:
name: get deploy information
runs-on: ubuntu-latest
needs: build
steps:
- env:
destination-repository: ${{needs.build.outputs.destination-repository}}
target-branch: ${{needs.build.outputs.target-branch}}
run: |
echo "$destination-repository" |
echo "$target-branch"