File tree Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Deployer
2
+ run-name : Build and deploy zoug.fr
3
+ on :
4
+ push :
5
+ workflow_dispatch :
6
+
7
+ jobs :
8
+ build :
9
+ runs-on : ubuntu-latest
10
+ environment : deploy
11
+ steps :
12
+ - name : Checkout the current branch
13
+ uses : actions/checkout@v4
14
+
15
+ - name : Initialize the ssh-agent
16
+ uses :
webfactory/[email protected]
17
+ with :
18
+ ssh-private-key : ${{ secrets.CI_SSH_PRIVKEY }}
19
+
20
+ - name : Install Zola
21
+ run : sudo snap install zola --edge
22
+
23
+ - name : Build the website
24
+ run : zola build
25
+
26
+ - name : Scan the host key
27
+ run : ssh-keyscan ${{ CI_SSH_HOSTNAME }} >> ~/.ssh/known_hosts
28
+ env :
29
+ CI_SSH_HOSTNAME : ${{ secrets.CI_SSH_HOSTNAME }}
30
+
31
+ - name : Deploy the website
32
+ run : >-
33
+ rsync -avx --delete --exclude '.ssh' public/ ${{ CI_SSH_USER }}@${{ CI_SSH_HOSTNAME }}:./
34
+ env :
35
+ CI_SSH_HOSTNAME : ${{ secrets.CI_SSH_HOSTNAME }}
36
+ CI_SSH_USER : ${{ secrets.CI_SSH_USER }}
You can’t perform that action at this time.
0 commit comments