-
Notifications
You must be signed in to change notification settings - Fork 2
33 lines (26 loc) · 847 Bytes
/
publish.yaml
File metadata and controls
33 lines (26 loc) · 847 Bytes
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
name: publish
on:
push:
branches: [main]
jobs:
publish-site:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup git
run: |
git config --global user.email "mpippi@gmail.com"
git config --global user.name "masci"
git remote add upstream https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git
- name: Setup Hugo
uses: peaceiris/actions-hugo@v3
with:
extended: true
- name: Build site
run: hugo -s site
- name: Push gh-pages branch
run: |
git add -A --force
git commit -m"rebuilding site from ${{ github.sha }}"
git push upstream `git subtree split --prefix=site/public --ignore-joins`:gh-pages --force