Skip to content

chore(ci): use seprate steps for raw,theme checkout #3

chore(ci): use seprate steps for raw,theme checkout

chore(ci): use seprate steps for raw,theme checkout #3

Workflow file for this run

name: Build and deploy notes
on:
push:
branches:
- raw
- theme
- main
pull_request:
permissions:
contents: write
jobs:
build-and-deploy:
runs-on: ubuntu-latest
env:
ZOLA_VERSION: '0.17.1'
steps:
- name: Checkout theme core
uses: actions/checkout@v3
- name: Checkout raw notes
run: |
pwd
ls -lah
rm -rf content/*
git clone --depth=1 https://github.com/pwnwriter/pwnotes raw_pwnotes --branch=raw
mv raw_pwnotes/* content/ && rm -rf raw_pwnotes
- name: Install Zola
uses: taiki-e/install-action@v2
with:
tool: zola@${{ env.ZOLA_VERSION }}
- name: Build the site
run: |
zola --version
zola build
- name: Deploy build to gh-pages branch
uses: crazy-max/ghaction-github-pages@v4
with:
target_branch: gh-pages
build_dir: public
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}