Put the zola binary in PATH for CI #9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
if: github.ref != 'refs/heads/main' | |
steps: | |
- name: 'Checkout' | |
uses: actions/checkout@main | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- run: | | |
apt-get update && apt-get install -y wget git | |
- run: | | |
wget -q -O - \ | |
"https://github.com/getzola/zola/releases/download/v0.19.1/zola-v0.19.1-x86_64-unknown-linux-gnu.tar.gz" \ | |
| tar xzf - -C /usr/local/bin | |
- run: npm install | |
- run: npm run abridge | |
- name: 'Build only' | |
uses: shalzz/[email protected] | |
env: | |
BUILD_DIR: . | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
BUILD_ONLY: true | |
build_and_deploy: | |
runs-on: ubuntu-latest | |
if: github.ref == 'refs/heads/main' | |
steps: | |
- name: 'Checkout' | |
uses: actions/checkout@main | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- run: | | |
apt-get update && apt-get install -y wget git | |
- run: | | |
wget -q -O - \ | |
"https://github.com/getzola/zola/releases/download/v0.19.1/zola-v0.19.1-x86_64-unknown-linux-gnu.tar.gz" \ | |
| tar xzf - -C /usr/local/bin | |
- run: npm install | |
- run: npm run abridge | |
- name: 'Build and deploy' | |
uses: shalzz/[email protected] | |
env: | |
PAGES_BRANCH: gh-pages | |
BUILD_DIR: . | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |