2024-02-17 21:29:12 +01:00
|
|
|
name: Deploy blog to GitHub Pages
|
|
|
|
|
2024-02-17 20:58:54 +01:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
deploy:
|
|
|
|
runs-on: ubuntu-22.04
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2024-02-17 21:29:12 +01:00
|
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install Zola
|
|
|
|
run: |
|
|
|
|
curl -s -L https://github.com/getzola/zola/releases/download/v0.18.0/zola-v0.18.0-x86_64-unknown-linux-gnu.tar.gz | sudo tar xvzf - -C /usr/local/bin
|
|
|
|
- name: Install ghp-import
|
|
|
|
run: sudo pip install ghp-import
|
|
|
|
- name: Update submodules
|
|
|
|
run: git submodule update --init
|
|
|
|
- name: Build blog
|
|
|
|
run: zola build -o public
|
|
|
|
- name: Deploy to GitHub Pages
|
|
|
|
run: |
|
|
|
|
ghp-import -n public -b gh-pages
|
|
|
|
git remote set-url origin https://{{ secrets.PAT }}@github.com/TheAwiteb/TheAwiteb.github.io.git
|
|
|
|
git push -f origin gh-pages
|