-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (39 loc) · 1.18 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
name: Deploy Website to Github Pages
on:
push:
branches: [master]
pull_request:
jobs:
build_and_deploy:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install dependencies
run: |
# Install Python and Pelican.
python -m pip install --upgrade pip
python -m pip install "pelican[markdown]"
# Install Stork.
cd /usr/bin/
sudo wget https://files.stork-search.net/releases/v1.5.0/stork-ubuntu-20-04
sudo chmod +x stork-ubuntu-20-04
sudo ln -s stork-ubuntu-20-04 stork
# Build the website for Production.
- name: Build
run: |
cd site
pelican content -s publishconf.py
# Deploy the site built into the gh-pages branch.
# You need to configure pages to be at gh-pages and serve the root folder.
- name: Deploy
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: site/output
branch: gh-pages