bug fix #9
This file contains 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: GadgetPlus | |
on: | |
push: | |
branches: [ master ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Setup node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '20' | |
- name: Log current directory | |
run: pwd | |
- name: List files in current directory | |
run: ls -la | |
- name: Install dependencies | |
run: npm install | |
- name: Configure .env file | |
run: | | |
echo "${{ secrets.PRODUCTION_ENV_FILE }}" > .env | |
- name: Start Application | |
run: npm start | |
# env: | |
# NODE_ENV: production | |
# Uncomment and configure the following lines if you need to deploy to AWS EC2 | |
# - name: Deploy to AWS EC2 using ssh | |
# uses: appleboy/ssh-action@v0.1.4 | |
# with: | |
# host: ${{ secrets.EC2_PUBLIC_IP }} | |
# username: ubuntu | |
# key: ${{ secrets.EC2_SSH_PRIVATE_KEY }} | |
# script: | | |
# echo "Connected to AWS EC2 instance" | |
# cd ~/home/danielwetan/apps/node1 | |
# git pull origin master | |
# git status | |
# npm install | |
# pm2 start app.js |