-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (43 loc) · 1.32 KB
/
deploy-pipeline.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: Deploy
on:
workflow_dispatch:
push:
branches:
- main
jobs:
build:
name: Build and Deploy
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Checkout submodules
run: git submodule update --init --recursive
- name: Setup Hugo
env:
HUGO_VERSION: 0.122.0
run: |
mkdir ~/hugo
cd ~/hugo
curl -L "https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_Linux-64bit.tar.gz" --output hugo.tar.gz
tar -xvzf hugo.tar.gz
sudo mv hugo /usr/local/bin
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.11' # Specify the version of Python you want to use
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pyyaml
- name: Run Makefile
run: make site
- name: Upload via FTP
uses: airvzxf/ftp-deployment-action@latest
with:
server: ${{ secrets.FTP_SERVER }}
user: ${{ secrets.FTP_LOGIN }}
password: ${{ secrets.FTP_PASSWORD }}
local_dir: "./public/"
remote_dir: "./"
delete: "true"