Skip to content

fixup! ci: add buil on push to main #152

fixup! ci: add buil on push to main

fixup! ci: add buil on push to main #152

Workflow file for this run

# Simple workflow for deploying static content to GitHub Pages
name: Build pages
on:
push:
branches: ["main"]
schedule:
- cron: "0 15 * * *" # Daily PST 8am
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout this repository
uses: actions/checkout@v4
- name: Checkout ketozhang/Journal
uses: actions/checkout@v4
with:
repository: "ketozhang/Journal"
path: src
ssh-key: ${{ secrets.ID_RSA }}
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.10.7'
cache: 'pip'
cache-dependency-path: "requirements.lock"
- name: Install Python dependencies
run: pip install -r requirements.lock
- name: Build site
run: |
make clean
make -j 5 build
- name: Commit files
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add _site/
git diff-index --quiet HEAD || git commit -am "[ci] Pull and build sources from https://github.com/ketozhang/Journal"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}