Skip to content

Instantly share code, notes, and snippets.

@devvspaces
Created September 21, 2023 15:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save devvspaces/21347a5337089537a09475619c0a8dbe to your computer and use it in GitHub Desktop.
Save devvspaces/21347a5337089537a09475619c0a8dbe to your computer and use it in GitHub Desktop.
Deploying Build artifacts to AWS EC2
name: Deploy Application
on:
push:
branches: [master]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: npm install
- name: Build application
run: npm run build
- name: Deploy application to live server
uses: appleboy/scp-action@v0.1.4
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.PEM_KEY }}
source: "dist/"
target: "/home/ubuntu/production/web"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment