Skip to content

Commit

Permalink
Create jekyll.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Saransh-cpp authored Aug 14, 2024
1 parent da541c0 commit b6458b5
Showing 1 changed file with 68 additions and 0 deletions.
68 changes: 68 additions & 0 deletions .github/workflows/jekyll.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Build and deploy website
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4 # FIXME: add apt(latex)
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile') }}
restore-keys: |
${{ runner.os }}-gems-
- uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt', '.github/python/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install TeXLive
uses: DanySK/[email protected]
- id: setup-python
name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.12
- name: Install dependencies
run: python -m pip install -r .github/python/requirements.txt
- name: Building notes
run: make ready
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3'
- name: Install bundler and dependencies
run: |
gem install bundler
bundle install
- name: Build website
run: bundle exec jekyll build
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: _site

deploy:
needs: build
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
if: >
success()
&& github.ref == 'refs/heads/main'
id: deployment
uses: actions/deploy-pages@v4

0 comments on commit b6458b5

Please sign in to comment.