Skip to content

Commit

Permalink
revert
Browse files Browse the repository at this point in the history
  • Loading branch information
aidantrabs authored and juancwu committed Nov 25, 2024
1 parent 422a60e commit a670763
Showing 1 changed file with 24 additions and 7 deletions.
31 changes: 24 additions & 7 deletions .github/workflows/deploy-preview-frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,44 @@ on:
jobs:
build-and-deploy-frontend:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
working-directory: frontend
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install pnpm globally
run: npm install -g pnpm
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9
run_install: false
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'pnpm'
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- name: Setup pnpm cache
uses: actions/cache@v3
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
working-directory: frontend
run: pnpm install
run: pnpm install --frozen-lockfile
- name: Build
working-directory: frontend
run: pnpm build
- name: Deploy to server
uses: appleboy/scp-action@master
with:
host: ${{ secrets.PREVIEW_SERVER_IP }}
username: ${{ secrets.PREVIEW_USER }}
key: ${{ secrets.PREVIEW_SERVER_SSH_KEY }}
source: "frontend/dist/"
source: "dist/"
target: "${{ secrets.TARGET_DIR }}"
strip_components: 2
strip_components: 1

0 comments on commit a670763

Please sign in to comment.