Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
ブログ用
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