Skip to content

Commit

Permalink
Merge pull request #9 from leandrodalbo/automated-build
Browse files Browse the repository at this point in the history
adding scp step
  • Loading branch information
leandrodalbo authored Dec 14, 2024
2 parents 00215d5 + e70ccd7 commit 4df3fb7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,16 @@ name: Publish
on:
push:
branches:
- main

- "main"
jobs:
build:
name: Build
runs-on: ubuntu-22.04
env:
DEPLOY_DESTINATION: ${{ secrets.DEPLOY_DESTINATION }}
DEPLOY_PORT: ${{ secrets.DEPLOY_PORT }}
SSHKEY: ${{ secrets.SSHKEY }}
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
strategy:
matrix:
node-version: [23.x]
Expand All @@ -30,3 +34,9 @@ jobs:

- name: Build
run: npm run build

- name: Deploy
run: |
ssh-agent -a $SSH_AUTH_SOCK > /dev/null
ssh-add - <<< "${{ env.SSHKEY }}" > /dev/null
scp -P ${{ env.DEPLOY_PORT }} -o StrictHostKeyChecking=no -r dist/* ${{ env.DEPLOY_DESTINATION }} > /dev/null
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ pnpm-debug.log*
lerna-debug.log*

node_modules

dist
dist-ssr
*.local

Expand Down

0 comments on commit 4df3fb7

Please sign in to comment.