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 11, 2025
1 parent 8630b8c commit 491bdaa
Showing 1 changed file with 10 additions and 36 deletions.
46 changes: 10 additions & 36 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,40 +4,14 @@ on:
push:
branches: [main]
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: bundle
path: ./dist

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

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

- 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: "dist/"
TARGET: "~/biblys.org"
jobs:
build-and-deploy:
uses: clemlatz/build-and-deploy/.github/workflows/workflow.yml@main
with:
build-output-directory: dist
remote-target-path: ~/biblys.org
secrets:
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 }}

0 comments on commit 491bdaa

Please sign in to comment.