fix for jsonSchema #74
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
env: | |
NODE_VERSION: '20.x' | |
TZ: 'Asia/Seoul' | |
on: | |
push: | |
branches: | |
- 'main' | |
pull_request: | |
branches: | |
- 'main' | |
jobs: | |
build_and_deploy: | |
runs-on: ubuntu-latest | |
# if: contains(github.ref, 'refs/heads/release/') | |
steps: | |
- uses: actions/checkout@v4 | |
# - name: extract branch part | |
# id: extract_release_environment | |
# run: | | |
# BRANCH_NAME="${GITHUB_REF#refs/heads/}" # Strip refs/heads/ | |
# IFS='/' read -ra PARTS <<< "$BRANCH_NAME" # Split into array | |
# if [ ${#PARTS[@]} -gt 1 ]; then | |
# echo "::set-output name=release_environment::${PARTS[1]}" | |
# else | |
# echo "Branch does not have a second part." | |
# echo "::set-output name=release_environment::" | |
# fi | |
# env: | |
# GITHUB_REF: ${{ github.ref }} | |
- name: Install pnpm | |
uses: pnpm/action-setup@v4 | |
with: | |
version: latest | |
- name: Use Node.js ${{ env.NODE_VERSION }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
- name: Restore dependencies | |
run: pnpm install --no-frozen-lockfile | |
- name: Build | |
run: pnpm run build | |
- name: Prevent npm install on Elastic Beanstalk | |
run: | | |
rm -rf ./node_modules | |
mkdir node_modules | |
touch node_modules/.gitkeep | |
- name: Zip | |
run: zip -r artifact.zip ./dist package.json Procfile ./.platform ./.ebextensions ./node_modules | |
- name: Upload zip as artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: artifact | |
path: artifact.zip | |
- name: Get current time | |
uses: 1466587594/get-current-time@v2 | |
id: current-time | |
with: | |
format: YYYY-MM-DDTHH-mm-ss | |
utcOffset: '+09:00' | |
- name: Deploy to EB | |
uses: einaregilsson/beanstalk-deploy@v22 | |
with: | |
aws_access_key: ${{ secrets.AWS_ACCESSKEY }} | |
aws_secret_key: ${{ secrets.AWS_SECRETKEY }} | |
application_name: ozadv | |
environment_name: Ozadv-env-1 | |
version_label: github-action-${{steps.current-time.outputs.formattedTime}} | |
region: ap-northeast-2 | |
deployment_package: artifact.zip |