-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (43 loc) · 1.18 KB
/
deploy.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
name: Deploy website
on:
push:
branches:
- master
- main
pull_request:
jobs:
deploy:
runs-on: ubuntu-22.04
steps:
- name: Checkout submodules
uses: actions/checkout@v3
with:
submodules: true
fetch-depth: 0
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: 'latest'
- name: Replace secrets
env:
PIWIK_URL: ${{ secrets.PIWIK_URL }}
PIWIK_TOKEN_AUTH: ${{ secrets.PIWIK_TOKEN_AUTH }}
run: |
cp static/config.sample.php static/config.php
sed -i -e "s|%PIWIK_URL%|$PIWIK_URL|" static/config.php
sed -i -e "s|%PIWIK_TOKEN_AUTH%|$PIWIK_TOKEN_AUTH|" static/config.php
- name: Build website
run: hugo
- name: Copy website to host
uses: appleboy/[email protected]
with:
host: pfadfinder-konstanz.de
username: pfadiskn
key: ${{ secrets.SSH_KEY }}
port: 22
timeout: 1m
command_timeout: 2m
target: "/var/www/virtual/pfadiskn/html/"
source: "public/*"
rm: true
strip_components: 1