-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (49 loc) · 1.39 KB
/
deploy.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
50
name: 🚀 Deploy website on tag
on:
push:
tags:
- '*'
jobs:
build:
if: github.event.base_ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
- name: ↧ Install Node.js
uses: actions/setup-node@v3
with:
node-version: 20.x
- name: ↧ npm ci
run: npm ci
- name: ⚛ Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.123.7'
extended: true
- name: ⚙ Build
run: npm run build
- name: 𝍖 Create Index
run: npm run index
- name: 🏷️ Get tag name
run: echo "TAG_NAME=$(echo ${GITHUB_REF#refs/*/} | tr / -)" >> $GITHUB_ENV
- name: 📂 Archive
uses: JamesIves/github-pages-deploy-action@4.1.7
with:
branch: release-diff
folder: public
clean: true
commit-message: Release ${{ env.TAG_NAME }}
- name: 🎉 Deploy
uses: SamKirkland/FTP-Deploy-Action@4.2.0
with:
server: mv-wollbach.de
username: ${{ secrets.ftp_user }}
password: ${{ secrets.ftp_password }}
protocol: ftps
local-dir: ./public/
server-dir: /html/
security: loose
port: 21