-
Notifications
You must be signed in to change notification settings - Fork 15
45 lines (38 loc) · 1.29 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
name: build-html
on:
pull_request:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install Nene
run: python -m pip install -r requirements.txt
- name: Build the website
run: make
- name: Add extra files for GitHub pages
run: |
touch _build/.nojekyll
echo "www.compgeolab.org" > _build/CNAME
- name: Push to compgeolab.github.io
if: success() && github.event_name == 'push'
# Don't use tags: https://julienrenaux.fr/2019/12/20/github-actions-security-risk/
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
external_repository: compgeolab/compgeolab.github.io
publish_branch: master
publish_dir: ./_build
# Only keep the latest commit to avoid bloating the repository
force_orphan: true
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'