Skip to content

ci: Upgrade zola

ci: Upgrade zola #46

Workflow file for this run

name: Build
on:
push:
branches:
- main
jobs:
deploy:
name: Build and deploy the site
runs-on: ubuntu-latest
steps:
- name: Check out the repository
env:
REPOSITORY: ${{ github.repository }}
run: |
ls -la
git clone "https://github.com/$REPOSITORY" .
- name: Download Zola
run: |
version='v0.18.0'
archive="zola-${version}-x86_64-unknown-linux-gnu.tar.gz"
curl -L "https://github.com/getzola/zola/releases/download/${version}/${archive}" -o "$archive"
tar xf "$archive"
- name: Build the site
run: |
./zola build
- name: Deploy the site
working-directory: ./public
env:
DEPLOY_SECRET_KEY: ${{ secrets.DEPLOY_SECRET_KEY }}
run: |
mkdir ~/.ssh
echo "$DEPLOY_SECRET_KEY" > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519
echo 'Host *' >> ~/.ssh/config
echo ' StrictHostKeyChecking=no' >> ~/.ssh/config
git config --global user.email "noreply@ruma.dev"
git config --global user.name "CI"
git init -b built
git add -A
git commit -m "Add files generated by zola"
git push -f git@github.com:ruma/ruma.dev built