Skip to content

Instantly share code, notes, and snippets.

@einnar82
Last active November 25, 2020 01:12
Show Gist options
  • Save einnar82/96f06d4f1a25acc8150ea11a2a5b14b6 to your computer and use it in GitHub Desktop.
Save einnar82/96f06d4f1a25acc8150ea11a2a5b14b6 to your computer and use it in GitHub Desktop.
Github actiions for Vue.js to AWS S3
name: S3 Deploy
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@master
- name: Cache node modules
uses: actions/cache@v1
with:
path: node_modules
key: ${{ runner.OS }}-build-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.OS }}-build-
${{ runner.OS }}-
- name: Install
run: npm install
- name: Build
run: npm run build
- name: Deploy
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
run: |
aws s3 cp \
--recursive \
--region ap-northeast-2 \
dist s3://{{your-s3-link}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment