-
Notifications
You must be signed in to change notification settings - Fork 32
44 lines (38 loc) · 1.34 KB
/
main.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
name: Publish Notion website to GitHub Pages
on:
# Manual update only.
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout loconotion
uses: actions/checkout@v2
with:
repository: leoncvlt/loconotion
path: loconotion
- name: Checkout this repo
uses: actions/checkout@v2
with:
path: pages_repo
- name: Build Loconotion docker image
run: docker-compose build loconotion
working-directory: loconotion
- name: Run Loconotion
run: |
docker-compose run \
-v "$GITHUB_WORKSPACE/pages_repo/dist:/app/loconotion/dist" \
-v "$GITHUB_WORKSPACE/pages_repo/site.toml:/app/loconotion/site.toml" \
loconotion "site.toml"
working-directory: loconotion
- name: What's the deal?
run: |
find "$GITHUB_WORKSPACE"
- name: Push to GitHub pages
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
GIT_DEPLOY_DIR=dist/site \
GIT_DEPLOY_BRANCH=gh-pages \
GIT_DEPLOY_REPO="https://${{ github.token }}@github.com/${{ github.repository }}.git" ./deploy.sh
working-directory: pages_repo