Created
September 21, 2023 15:28
-
-
Save devvspaces/21347a5337089537a09475619c0a8dbe to your computer and use it in GitHub Desktop.
Deploying Build artifacts to AWS EC2
This file contains hidden or 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
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/[email protected] | |
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