Skip to content

Commit

Permalink
build: use reusable workflow to build and deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
clemlatz committed Jan 10, 2025
1 parent 0ea33ef commit 770d4d4
Showing 1 changed file with 8 additions and 35 deletions.
43 changes: 8 additions & 35 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,38 +6,11 @@ on:
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Build
run: npm install && npm run build

- name: Upload artifact
uses: actions/upload-artifact@master
with:
name: site
path: ./out

upload:
runs-on: ubuntu-latest
needs: build

steps:
- name: Download artifact
uses: actions/download-artifact@master
with:
name: site
path: ./site

- name: Deploy with SSH
uses: easingthemes/[email protected]
with:
SSH_PRIVATE_KEY: ${{ secrets.BIBLYS_ORG_SSH_PRIVATE_KEY }}
REMOTE_HOST: ${{ secrets.BIBLYS_ORG_SSH_HOST }}
REMOTE_USER: ${{ secrets.BIBLYS_ORG_SSH_USER }}
SOURCE: "site/"
TARGET: "~/blog.biblys.org"
build-and-deploy:
uses: clemlatz/build-and-deploy/.github/workflows/workflow.yml@main
with:
ssh-private-key: ${{ secrets.BIBLYS_ORG_SSH_PRIVATE_KEY }}
ssh-remote-host: ${{ secrets.BIBLYS_ORG_SSH_HOST }}
ssh-remote-user: ${{ secrets.BIBLYS_ORG_SSH_USER }}
build-output-directory: "out"
remote-target-path: "~/blog.biblys.org"

0 comments on commit 770d4d4

Please sign in to comment.