-
Notifications
You must be signed in to change notification settings - Fork 13
47 lines (38 loc) · 1.18 KB
/
update-gh-pages.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
name: Update Github Pages
on:
# push:
# branches:
# - master
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE
- name: Checkout branch to build
uses: actions/checkout@v2
with:
path: src
- name: Checkout gh-pages
uses: actions/checkout@v2
with:
path: gh-pages
ref: gh-pages
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: "3.5"
- name: Install generator tools
run: pip install docutils pygments
- name: Setup Git config for push
run: |
git config --global user.name 'Jashandeep Sohi'
git config --global user.email '[email protected]'
- name: Update gh-pages branch
run: |
cd "$GITHUB_WORKSPACE/gh-pages"
rst2html5.py "$GITHUB_WORKSPACE/src/README.rst" index.html
git add index.html
git commit -m "Update pages"
git push origin gh-pages