Skip to content

fix: deploy.yml 되돌리기 #56

fix: deploy.yml 되돌리기

fix: deploy.yml 되돌리기 #56

Workflow file for this run

name: Deploy
on:
push:
branches: ['main']
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Type check (tsc)
run: npm run tsc --if-present
- name: Lint check (eslint)
run: npm run lint --if-present
- name: Run tests
run: npm test --if-present
- name: creates output
run: sh ./build.sh
- name: Verify build output
run: |
if [ ! -d "output" ]; then
echo "Error: output directory not created"
exit 1
fi
if [ -z "$(ls -A output 2>/dev/null)" ]; then
echo "Error: output directory is empty"
exit 1
fi
echo "Build output verified successfully"
ls -la output/
- name: Pushes to another repository
uses: cpina/github-action-push-to-another-repository@main
env:
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
with:
source-directory: 'output'
destination-github-username: youjin-hong
destination-repository-name: client
user-email: ${{ secrets.EMAIL }}
commit-message: ${{ github.event.commits[0].message }}
target-branch: main