Skip to content

Commit d49aad7

Browse files
steff456rgommers
andauthored
PR: Add an action to deploy the webpage automatically (#9)
Co-authored-by: Ralf Gommers <ralf.gommers@gmail.com>
1 parent 024cf53 commit d49aad7

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: github pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main # Set a branch to deploy
7+
8+
jobs:
9+
deploy:
10+
runs-on: ubuntu-20.04
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.ref }}
13+
steps:
14+
- uses: actions/checkout@v2
15+
with:
16+
submodules: true # Fetch Hugo themes (true OR recursive)
17+
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
18+
19+
- name: Setup Hugo
20+
uses: peaceiris/actions-hugo@v2
21+
with:
22+
hugo-version: '0.97.0'
23+
extended: true
24+
25+
- name: Create site
26+
run: |
27+
hugo
28+
touch public/.nojekyll
29+
echo data-apis.org > public/CNAME
30+
31+
- name: Deploy
32+
uses: peaceiris/actions-gh-pages@v3
33+
if: github.ref == 'refs/heads/main'
34+
with:
35+
github_token: ${{ secrets.GITHUB_TOKEN }}
36+
publish_dir: ./public

0 commit comments

Comments
 (0)