Skip to content
This repository has been archived by the owner on Jul 2, 2024. It is now read-only.

Core

Core #6

Workflow file for this run

name: Core
on:
schedule:
- cron: "0 21 * * 1"
push:
branches: ["main"]
workflow_dispatch:
permissions:
contents: write
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
sync:
name: Sync
if: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- name: Set up Git
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Set up Rust
uses: dtolnay/rust-toolchain@stable
- name: Install dependencies
run: |
pip install python-dateutil
cargo install --git https://github.com/MRepoApp/mrepo-rs.git
- name: Sync
run: |
mrepo update
- name: Push
run: |
python scripts/git-commit.py
git push origin main
build:
name: Build Pages
if: always()
runs-on: ubuntu-latest
needs: sync
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Build with Jekyll
uses: actions/jekyll-build-pages@v1
with:
source: ./
destination: ./_site
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
deploy:
name: Deploy Pages
if: always()
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4