-
Notifications
You must be signed in to change notification settings - Fork 11
48 lines (40 loc) · 1.25 KB
/
publish_post.yaml
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
---
name: publish post
on:
push:
branches:
- main
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v4
- name: Checkout submodules
shell: bash
run: |
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
git submodule sync --recursive
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install pipenv
pipenv --version
pipenv install --dev
- name: Build
run: |
export GOOGLE_ANALYTICS=${{ secrets.GOOGLE_ANALYTICS }}
export UTTERANCES_REPO=${{ github.repository }}
pipenv run inv build-publish
- name: Deploy
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: ./output
user_name: "github-actions[bot]"
user_email: "github-actions[bot]@users.noreply.github.com"