Skip to content

feat: add github workflow #1

feat: add github workflow

feat: add github workflow #1

Workflow file for this run

name: deploy to SSH Instance
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 20
- name: Install Vite dependencies
run: npm install
- name: Build React app
run: npm run build
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: build
path: dist
- name: Deploy to SSH Instance
uses: ssh-actions/ssh-run@v2
env:
DEPLOY_HOST: ${{ secrets.SSH_HOST }} # Replace with your SSH hostname
DEPLOY_USER: ${{ secrets.SSH_USER }} # Replace with your SSH username
DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }} # This secret stores your private key
TARGET_DIR: '/var/www/html' # Replace with your deployment directory
with:
commands:
- cd ${{ env.TARGET_DIR }}

Check failure on line 35 in .github/workflows/deploy-stage.yaml

View workflow run for this annotation

GitHub Actions / deploy to SSH Instance

Invalid workflow file

The workflow is not valid. .github/workflows/deploy-stage.yaml (Line: 35, Col: 13): A sequence was not expected
- wget https://actions.githubusercontent.com/workflows/downloads/.../$ARTIFACT_NAME-0.tar.gz # Replace with artifact download URL
- tar -xvf $ARTIFACT_NAME-0.tar.gz