-
Notifications
You must be signed in to change notification settings - Fork 15
59 lines (50 loc) · 1.43 KB
/
main.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
48
49
50
51
52
53
54
55
56
57
58
59
name: Build and Deploy Site to GitHub Pages
on:
push:
branches:
- main
jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
persist-credentials: false
- name: Install Python
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Build static assets
run: |
npm install
npm run dist
- name: Cache dependencies
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: pelican-${{ hashFiles('requirements.txt') }}
restore-keys: |
pelican-
- name: Install Pelican
run: |
pip install -r requirements.txt
- name: Run Pelican
id: run-pelican
run: |
inv preview
# This step installs the ssh client into the workflow run.
# There's many options available for this on the action marketplace.
- name: Install SSH Client
uses: webfactory/ssh-agent@v0.4.1
with:
ssh-private-key: ${{ secrets.DEPLOY_KEY }}
- name: Build and Deploy Repo
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
BASE_BRANCH: main
BRANCH: gh-pages
FOLDER: output
CLEAN: true
SSH: true # SSH must be set to true so the deploy action knows which protocol to deploy with.