-
Notifications
You must be signed in to change notification settings - Fork 2
44 lines (44 loc) · 1.35 KB
/
build-and-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
name: Build and deploy
on:
pull_request:
push:
permissions:
contents: write
jobs:
success:
runs-on: ubuntu-24.04
steps:
# Checkout the repository
- name: Checkout
uses: actions/[email protected]
with:
fetch-depth: 0
submodules: recursive
fetch-tags: 'true'
- name: Setup Hugo
uses: peaceiris/[email protected]
with:
hugo-version: 0.139.4
extended: true
- name: Build Hugo website
run: hugo
- name: Debug
run: echo $GITHUB_REPOSITORY
- name: Deploy staging
if: github.event_name == 'push' && github.ref_name == 'master'
uses: JamesIves/[email protected]
with:
git-config-name: github-actions
git-config-email: [email protected]
branch: gh-pages
folder: public
- name: Deploy official website
if: github.event_name == 'push' && github.repository == 'pslab-unibo/web-frontend' && github.ref_name == 'master'
uses: JamesIves/[email protected]
with:
ssh-key: ${{ secrets.DEPLOY_KEY }}
git-config-name: github-actions
git-config-email: [email protected]
repository-name: pslab-unibo/pslab-unibo.github.io
branch: master
folder: public