add asc #41
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
## ec2 s3 deploy12 | |
name: Deploy to AWS | |
on: | |
push: | |
branches: [main] | |
jobs: | |
codeql: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
security-events: write | |
steps: | |
- name: Checkout source code | |
uses: actions/checkout@v2 | |
- name: Initialize CodeQL | |
uses: github/codeql-action/init@v2 | |
with: | |
languages: 'javascript' # 분석할 언어를 지정하세요 | |
- name: Perform CodeQL Analysis | |
uses: github/codeql-action/analyze@v2 | |
with: | |
output: results.sarif | |
- name: Upload CodeQL Results | |
uses: github/codeql-action/upload-sarif@v2 | |
with: | |
sarif_file: results.sarif | |
category: javascript-analysis # Specify a unique category | |
# deploy: | |
# runs-on: ubuntu-latest | |
# steps: | |
# - name: Checkout source code | |
# uses: actions/checkout@v2 | |
# - name: Configure AWS credentials | |
# uses: aws-actions/configure-aws-credentials@v4 | |
# with: | |
# aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
# aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
# aws-region: ap-northeast-2 | |
# - name: Create deployment package | |
# run: | | |
# pwd | |
# zip -r deploy.zip ./* | |
# - name: Upload to S3 | |
# run: | | |
# aws s3 cp deploy.zip s3://${{ secrets.S3_BUCKET }}/deploy.zip | |
# - name: Check and stop existing deployments | |
# run: | | |
# DEPLOYMENTS=$(aws deploy list-deployments \ | |
# --application-name simple-web-content \ | |
# --deployment-group-name simple-web-deploy-group \ | |
# --include-only-statuses "InProgress" \ | |
# --query 'deployments[]' \ | |
# --output text) | |
# if [ ! -z "$DEPLOYMENTS" ]; then | |
# for deployment in $DEPLOYMENTS; do | |
# echo "Stopping deployment $deployment" | |
# aws deploy stop-deployment --deployment-id $deployment | |
# done | |
# # 잠시 대기하여 취소가 완료되도록 함 | |
# sleep 10 | |
# fi | |
# - name: Start CodeDeploy deployment | |
# id: deploy | |
# run: | | |
# DEPLOYMENT_ID=$(aws deploy create-deployment \ | |
# --application-name simple-web-content \ | |
# --deployment-group-name simple-web-deploy-group \ | |
# --s3-location bucket=${{ secrets.S3_BUCKET }},key=deploy.zip,bundleType=zip \ | |
# --output text \ | |
# --query 'deploymentId') | |
# #echo "::set-output name=deployment_id::$DEPLOYMENT_ID" | |
# #echo "{name}=deployment_id" >> $GITHUB_OUTPUT | |
# echo "deployment_id=${DEPLOYMENT_ID}" >> $GITHUB_OUTPUT | |
# - name: Wait for deployment to complete | |
# run: | | |
# aws deploy wait deployment-successful --deployment-id ${{ steps.deploy.outputs.deployment_id }} |