-
Notifications
You must be signed in to change notification settings - Fork 0
115 lines (106 loc) · 2.77 KB
/
hugo.yaml
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
name: Deploy DearMEP site to Pages
on:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
defaults:
run:
shell: bash
jobs:
build-stage:
runs-on: ubuntu-latest
steps:
- name: Set Node.js 16.x
uses: actions/setup-node@v3
with:
node-version: 16.x
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0
- name: Run install
uses: borales/actions-yarn@v4
with:
cmd: install # will run `yarn install` command
- name: Build page
uses: borales/actions-yarn@v4
with:
cmd: run build:stage # will run `yarn install` command
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: dearmep-staging
path: ./public
# Deployment job
deploy-stage:
name: 🎉 Deploy stage
environment:
name: staging
url: https://stage.dearmep.eu
runs-on: ubuntu-latest
needs: build-stage
steps:
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: dearmep-staging
- name: 📂 Sync files
uses: SamKirkland/[email protected]
with:
server: webhost.epicenter.works
protocol: ftps
username: stage
password: ${{ secrets.ftp_password_stage }}
server-dir: ./public_html/
build-production:
runs-on: ubuntu-latest
steps:
- name: Set Node.js 16.x
uses: actions/setup-node@v3
with:
node-version: 16.x
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0
- name: Run install
uses: borales/actions-yarn@v4
with:
cmd: install # will run `yarn install` command
- name: Build page
uses: borales/actions-yarn@v4
with:
cmd: run build # will run `yarn install` command
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: dearmep-production
path: ./public
# Deployment job
deploy-production:
name: 🎉 Deploy production
environment:
name: production
url: https://dearmep.eu
runs-on: ubuntu-latest
needs: build-production
steps:
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: dearmep-production
- name: 📂 Sync files
uses: SamKirkland/[email protected]
with:
server: webhost.epicenter.works
protocol: ftps
username: dearmep
password: ${{ secrets.ftp_password_prod }}
server-dir: ./public_html/