feat: disallow setting default params in :persist #245
This file contains hidden or 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: Deploy documentation | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write # To push a branch | |
| pages: write # To push to a GitHub Pages site | |
| id-token: write # To update the deployment status | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| - name: Store version in environment | |
| run: | | |
| TAG=$(git describe --tags --always --abbrev=0) | |
| echo "CY_VERSION=${TAG:1}" >> $GITHUB_ENV | |
| - name: Install latest mdbook | |
| run: | | |
| tag="v0.4.35" | |
| url="https://github.com/rust-lang/mdbook/releases/download/${tag}/mdbook-${tag}-x86_64-unknown-linux-gnu.tar.gz" | |
| mkdir mdbook | |
| curl -sSL $url | tar -xz --directory=./mdbook | |
| echo `pwd`/mdbook >> $GITHUB_PATH | |
| - name: Set up Go | |
| uses: actions/setup-go@v4 | |
| with: | |
| go-version: "1.24" | |
| - name: Install vhs dependencies | |
| run: | | |
| # Install ttyd from https://github.com/tsl0922/ttyd/releases | |
| curl -L -o /usr/local/bin/ttyd https://github.com/tsl0922/ttyd/releases/download/1.7.7/ttyd.x86_64 && chmod +x /usr/local/bin/ttyd | |
| sudo apt update | |
| sudo apt install ffmpeg | |
| - name: Install vim and htop | |
| # For the "cy/project" story and "layout/dynamic/color-map" story | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -qqy vim htop libx11-dev | |
| - name: Build | |
| run: > | |
| go build | |
| -ldflags "-X github.com/cfoust/cy/pkg/version.Version=${CY_VERSION}" | |
| -o docs/storybook | |
| ./cmd/stories/... | |
| - name: Install the latest VHS | |
| run: | | |
| git clone https://github.com/charmbracelet/vhs.git | |
| cd vhs | |
| git checkout 5fd3e351f336734f73aa4dd53669f7727897cb5a | |
| go mod tidy | |
| go build -o ../vhs-bin . | |
| cd .. | |
| rm -r vhs | |
| mv vhs-bin docs/vhs | |
| - name: Build book | |
| run: | | |
| cd docs | |
| mdbook build | |
| - name: Setup pages | |
| uses: actions/configure-pages@v2 | |
| - name: Upload site | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| # Upload entire repository | |
| path: "docs/book" | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |