Skip to content

Publish Notion website to GitHub Pages #3

Publish Notion website to GitHub Pages

Publish Notion website to GitHub Pages #3

Workflow file for this run

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 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: 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