Vylepšení CI pipeline
This commit is contained in:
parent
02d3270e23
commit
974972222a
@ -1,4 +1,4 @@
|
||||
name: Build
|
||||
name: Build and Publish
|
||||
|
||||
on:
|
||||
push:
|
||||
@ -15,6 +15,8 @@ env:
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
artifact-name: build-output
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
@ -28,7 +30,24 @@ jobs:
|
||||
- name: 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: |
|
||||
apt update -y && apt-get install -y --no-install-recommends rsync
|
||||
eval "$(ssh-agent -s)"
|
||||
|
Loading…
x
Reference in New Issue
Block a user