Skip to content

Instantly share code, notes, and snippets.

@mktakuya
Created July 30, 2022 07:43
Show Gist options
  • Save mktakuya/96552475d41587983b7b5e6b405dafe6 to your computer and use it in GitHub Desktop.
Save mktakuya/96552475d41587983b7b5e6b405dafe6 to your computer and use it in GitHub Desktop.
ブログ用
name: Deploy Production
on:
push:
branches:
- release
jobs:
deploy-production:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
cache: 'npm'
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID_PRODUCTION }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY_PRODUCTION }}
aws-region: ap-northeast-1
- name: Run npm install
run: npm install
- name: Build
run: VITE_API_ORIGIN="https://example.com" npm run build
- name: Deploy to production
run: aws s3 sync dist/ s3://your-bucket-name/ --delete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment