Skip to content

Update main.yml

Update main.yml #2

Workflow file for this run

name: fantorage
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Git Checkout
uses: actions/checkout@v3
- name: Use Node.js version 18.x
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: yarn
cache-dependency-path: yarn.lock
- name: frontend yarn deploy
env:
NEXT_PUBLIC_API_URL: ${{secret.NEXT_PUBLIC_BASE_URL}}

Check failure on line 23 in .github/workflows/main.yml

View workflow run for this annotation

GitHub Actions / fantorage

Invalid workflow file

The workflow is not valid. .github/workflows/main.yml (Line: 23, Col: 32): Unrecognized named-value: 'secret'. Located at position 1 within expression: secret.NEXT_PUBLIC_BASE_URL .github/workflows/main.yml (Line: 24, Col: 43): Unrecognized named-value: 'secret'. Located at position 1 within expression: secret.NEXT_PUBLIC_KAKAO_REDIRECT_URI
NEXT_PUBLIC_KAKAO_REDIRECT_URI: ${{secret.NEXT_PUBLIC_KAKAO_REDIRECT_URI}}
NEXT_PUBLIC_KAKAO_REST_API_KEY: ${{secret.NEXT_PUBLIC_KAKAO_REST_API_KEY}}
run: |
cd frontend
npm install -g yarn
yarn install --frozen-lockfile
yarn deploy
- name: Enter dir and deploy
uses: serverless/[email protected]
with:
args: -c "cd backend && serverless plugin install --name serverless-webpack && serverless deploy"
entrypoint: /bin/sh
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secret.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secret.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secret.AWS_REGION }}
- name: Deploy to S3
env:
aws-access-key-id: ${{ secret.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secret.AWS_SECRET_ACCESS_KEY }}
run: |
aws s3 rm s3://${{secret.AWS_BUCKET_NAME}} --recursive
aws s3 cp --recursive --region ap-northeast-2 ./out s3://${{secret.AWS_BUCKET_NAME}}