Vylepšení CI pipeline
This commit is contained in:
parent
02d3270e23
commit
974972222a
@ -1,4 +1,4 @@
|
|||||||
name: Build
|
name: Build and Publish
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
@ -15,6 +15,8 @@ env:
|
|||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
artifact-name: build-output
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
@ -28,7 +30,24 @@ jobs:
|
|||||||
- name: Build
|
- name: Build
|
||||||
run: ./zola build
|
run: ./zola build
|
||||||
|
|
||||||
- name: Deploy
|
- name: Upload site artifact
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: build-output
|
||||||
|
path: public/
|
||||||
|
|
||||||
|
publish:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: build
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Download site artifact
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: build-output
|
||||||
|
path: public
|
||||||
|
|
||||||
|
- name: Deploy via rsync over SSH
|
||||||
run: |
|
run: |
|
||||||
apt update -y && apt-get install -y --no-install-recommends rsync
|
apt update -y && apt-get install -y --no-install-recommends rsync
|
||||||
eval "$(ssh-agent -s)"
|
eval "$(ssh-agent -s)"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user