-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (47 loc) · 1.36 KB
/
build.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
45
46
47
name: build site using Pelican
on:
workflow_dispatch:
jobs:
build-main:
runs-on: ubuntu-latest
steps:
- name: clone repo
uses: actions/checkout@v3
with:
submodules: recursive
- name: pull theme repo
run: |
cd pelicantheme
git fetch --all
git reset --hard origin/main
cd ..
- name: set up python
uses: actions/setup-python@v3
with:
python-version: 3.11.x
- name: install dependencies
run: |
python3 -m pip install -U pip
python3 -m pip install -r requirements.txt
- name: clean old outputs
run: |
rm -rf a/
rm -rf p/
rm -rf images/
- name: build
run: make
- name: commit changes # copied from ad-m/github-push-action
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add -A
git commit -m "built website" -a
- name: push built files
uses: ad-m/github-push-action@40bf560936a8022e68a3c00e7d2abefaf01305a6
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}
- name: set success check if no changes
if: always()
run: |
exit 0