Skip to content

Update unboxing post #116

Update unboxing post

Update unboxing post #116

Workflow file for this run

on:
push:
pull_request:
workflow_dispatch:
jobs:
build_and_deploy:
runs-on: ubuntu-latest
steps:
- name: "Set vars for build only if not on main"
run: |
echo "PAGES_BRANCH=test-pages" >> $GITHUB_ENV
if: github.ref != 'refs/heads/main'
- name: "Set vars for deploy if on main"
run: |
echo "PAGES_BRANCH=gh-pages" >> $GITHUB_ENV
if: github.ref == 'refs/heads/main'
- name: 'Install cargo'
run: sudo apt-get install -qy cargo
- name: "Cache cargo"
uses: actions/cache@v3
with:
path: ~/.cargo
key: cargo
- name: 'Install mdbook'
run: cargo install --locked mdbook mdbook-admonish mdbook-tabs mdbook-svgbob
- name: 'Checkout'
uses: actions/checkout@master
- name: 'Checkout acton repo'
uses: actions/checkout@master
with:
repository: 'actonlang/acton'
path: 'acton'
token: ${{ secrets.ACTBOT_PAT }}
- name: 'Build acton-by-example'
run: |
export PATH=/.cargo/bin:$PATH
cd acton/docs/acton-by-example
mdbook build -d ../../../static/learn/acton-by-example
- name: 'Build and deploy'
uses: shalzz/zola-deploy-action@master
env:
BUILD_DIR: .
TOKEN: ${{ secrets.ACTBOT_PAT }}
PAGES_BRANCH: ${{ env.PAGES_BRANCH }}