test 3 #3
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: Build and Deploy | |
on: | |
push: | |
branches: | |
- main # Trigger the workflow on pushes to the main branch | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18' # Specify your Node.js version | |
- name: Install dependencies | |
run: npm install | |
- name: Build | |
run: npm run build # Packages the application into an executable | |
- name: Deploy | |
run: | | |
echo "Deploying application..." | |
# Example deployment step: | |
# You can use SCP, FTP, or any other method to deploy the built application | |
# For example, to a remote server: | |
scp dist/index-linux-x64 user@remote-server:/path/to/deployment | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |