chore(ci): match all branch and run ci #4
Workflow file for this run
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
name: Build and deploy notes | |
on: | |
push: | |
branches: | |
- '**' | |
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 }} |