Skip to content

readme

readme #28

Workflow file for this run

name: Deploy to production
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- uses: actions/setup-node@v4
with:
cache: 'pnpm'
- run: pnpm install
- name: Build Projects
run: pnpm -r run build
- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: build-artifacts
path: |
apps/next-auth/dist/
apps/teste/dist/
deploy:
runs-on: ubuntu-latest
needs: build
strategy:
matrix:
app:
- name: 'next-auth'
path: './next-auth/dist/'
remote_path: '/var/www/guias/next-auth/'
- name: 'teste'
path: './teste/dist/'
remote_path: '/var/www/guias/teste/'
# Add more apps as needed
steps:
- name: Download build artifacts
uses: actions/download-artifact@v3
with:
name: build-artifacts
path: .
- name: List All Files after downloading artifacts (excluding node_modules)
run: find . -type d -name node_modules -prune -o -type f -print
- name: Deploy with rsync
uses: burnett01/[email protected]
with:
switches: -avzr --quiet --delete
path: ${{ matrix.app.path }}
remote_path: ${{ matrix.app.remote_path }}
remote_host: ${{ secrets.HOST }}
remote_user: ${{ secrets.USERNAME }}
remote_key: ${{ secrets.SSH_KEY }}