Add remote SSH command for triggering Astro build
This commit is contained in:
parent
c7bf11a5ee
commit
c966a4dba9
35
.github/workflows/astro.yml
vendored
35
.github/workflows/astro.yml
vendored
@ -1,28 +1,23 @@
|
|||||||
name: Deploy Astro site
|
name: Trigger Astro build on server
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: ["main"]
|
branches:
|
||||||
workflow_dispatch:
|
- main
|
||||||
|
|
||||||
env:
|
|
||||||
BUILD_PATH: "./astro"
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: Build
|
name: Run remote SSH command
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v2
|
||||||
- name: Setup Node
|
|
||||||
uses: actions/setup-node@v3
|
- name: Execute remote SSH commands
|
||||||
|
uses: appleboy/ssh-action@master
|
||||||
with:
|
with:
|
||||||
node-version: "16"
|
host: ${{ secrets.REMOTE_HOST }}
|
||||||
- name: Install dependencies
|
username: ${{ secrets.REMOTE_USER }}
|
||||||
run: yarn install
|
key: ${{ secrets.REMOTE_SSH_KEY }}
|
||||||
working-directory: ${{ env.BUILD_PATH }}
|
script: |
|
||||||
- name: Build with Astro
|
mkdir hallo
|
||||||
run: |
|
|
||||||
yarn astro build
|
|
||||||
working-directory: ${{ env.BUILD_PATH }}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user