-
Notifications
You must be signed in to change notification settings - Fork 18
43 lines (37 loc) · 1.22 KB
/
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
#
# Build and deploy the documentation
#
name: Deploy
# Run on main branch only
on:
push:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Hugo
uses: peaceiris/actions-hugo@v3.0.0
with:
hugo-version: 0.111.3
extended: true
- name: Build the website
run: make all
- name: Deploy documentation
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e
with:
# personal token is needed here because it's pushing to an external repository.
# personal token can be generated at https://github.com/settings/tokens,
# and added to https://github.com/organizations/seismo-learn/settings/secrets/actions
personal_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
# 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'