Work on CI/CD
This commit is contained in:
parent
2f6f6dd93e
commit
511011b46a
1 changed files with 18 additions and 4 deletions
|
@ -1,8 +1,8 @@
|
||||||
name: Deploy
|
name: Deploy
|
||||||
|
|
||||||
on: [push]
|
on: [ push ]
|
||||||
jobs:
|
jobs:
|
||||||
deploy:
|
build:
|
||||||
runs-on: docker
|
runs-on: docker
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
@ -11,14 +11,28 @@ jobs:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Setup Hugo
|
- name: Setup Hugo
|
||||||
run : |
|
run: |
|
||||||
curl -L -o hugo_0.140.0_linux-amd64.tar.gz https://github.com/gohugoio/hugo/releases/download/v0.140.0/hugo_0.140.0_linux-amd64.tar.gz
|
curl -L -o hugo_0.140.0_linux-amd64.tar.gz https://github.com/gohugoio/hugo/releases/download/v0.140.0/hugo_0.140.0_linux-amd64.tar.gz
|
||||||
tar zxvf hugo_0.140.0_linux-amd64.tar.gz
|
tar zxvf hugo_0.140.0_linux-amd64.tar.gz
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: ./hugo
|
run: ./hugo
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v3
|
- name: Upload artifact
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: website
|
name: website
|
||||||
path: public/
|
path: public/
|
||||||
|
|
||||||
|
deploy:
|
||||||
|
runs-on: docker
|
||||||
|
steps:
|
||||||
|
- uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: website
|
||||||
|
|
||||||
|
- name: Install lftp
|
||||||
|
run: apt install -y lftp
|
||||||
|
|
||||||
|
- name: Deploy website
|
||||||
|
run: lftp -c "open -u $FTP_USER,$FTP_PASS $FTP_HOST; mirror -R public/ ~/$FTP_DIR; quit"
|
Loading…
Add table
Add a link
Reference in a new issue