Skip to content

Update react-router monorepo to v7.8.1 #76

Update react-router monorepo to v7.8.1

Update react-router monorepo to v7.8.1 #76

Workflow file for this run

name: Build and Deploy to Server
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
test-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22.x'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm test -- --watchAll=false
env:
CI: true
- name: Create .env file
if: github.ref == 'refs/heads/main'
run: |
echo "REACT_APP_API_URL=${{ vars.REACT_APP_API_URL }}" > .env
echo "REACT_APP_VOCTOWEB_API_URL=${{ vars.REACT_APP_VOCTOWEB_API_URL }}" >> .env
- name: Build application
run: npm run build
env:
CI: false
- name: Deploy to Server via SCP
if: github.ref == 'refs/heads/main'
uses: appleboy/scp-action@v0.1.7
with:
host: ${{ secrets.DEPLOY_HOST }}
username: ${{ secrets.DEPLOY_USER }}
key: ${{ secrets.DEPLOY_KEY }}
port: ${{ secrets.DEPLOY_PORT || 22 }}
source: "build/*,.env"
target: ${{ secrets.DEPLOY_PATH }}
strip_components: 1
overwrite: true