-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (34 loc) · 1.06 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
name: Deploy
on:
workflow_dispatch:
jobs:
build-and-deploy:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
container: sphinxdoc/sphinx
steps:
- name: Install 🔧
shell: bash
run: |
apt-get update
apt-get install -y git rsync
# The next line seems to be needed to work around a bug in either
# checkout action or deploy action. It seems to have something to do
# with running this inside a container. See
# https://github.com/actions/checkout/issues/363#issuecomment-1174987633
git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Checkout 🛎️
uses: actions/checkout@v3
- name: Install 🔧
shell: bash
run: |
pip3 install -r requirements.txt
- name: Build 🛠
shell: bash
run: sphinx-build source build
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: build
clean: true