first commit
This commit is contained in:
parent
20927c5e1a
commit
0f7cc99931
@ -1,2 +1,10 @@
|
|||||||
# setup-zola
|
# setup-zola
|
||||||
|
|
||||||
|
This action sets up Zola static site generator in your GitHub Actions workflow.
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
uses: my-org/setup-zola@v1
|
||||||
|
with:
|
||||||
|
version: '0.18.0' # Optional
|
||||||
|
16
action.yml
Normal file
16
action.yml
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
name: "Setup Zola"
|
||||||
|
description: "Download and install Zola static site generator"
|
||||||
|
inputs:
|
||||||
|
version:
|
||||||
|
description: "The version of Zola to install"
|
||||||
|
required: false
|
||||||
|
default: "0.18.0"
|
||||||
|
runs:
|
||||||
|
using: "composite"
|
||||||
|
steps:
|
||||||
|
- name: Install dependencies
|
||||||
|
run: apt-get update && apt-get install -y curl tar
|
||||||
|
- name: Run install script
|
||||||
|
run: |
|
||||||
|
chmod +x ${{ github.action_path }}/scripts/install_zola.sh
|
||||||
|
${{ github.action_path }}/scripts/install_zola.sh ${{ inputs.version }}
|
13
script/install_zola.sh
Normal file
13
script/install_zola.sh
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
ZOLA_VERSION="0.18.0"
|
||||||
|
|
||||||
|
echo "Downloading Zola version $ZOLA_VERSION..."
|
||||||
|
curl -L https://github.com/getzola/zola/releases/download/v$ZOLA_VERSION/zola-v$ZOLA_VERSION-x86_64-unknown-linux-gnu.tar.gz -o zola.tar.gz
|
||||||
|
tar -xvf zola.tar.gz
|
||||||
|
chmod +x zola
|
||||||
|
sudo mv zola /usr/local/bin
|
||||||
|
|
||||||
|
echo "Zola installed successfully."
|
Loading…
x
Reference in New Issue
Block a user