Deploy #1786
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: Deploy | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
branches: [master] | |
schedule: | |
- cron: "0 18 * * *" | |
repository_dispatch: | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: ⏬ Install zola | |
run: sudo snap install --edge zola | |
- name: ⏬ Install gh-stats | |
run: | | |
set -e | |
mkdir bin | |
curl -sSL https://github.com/mre/gh-stats/releases/download/v0.1.0/gh-stats-v0.1.0-x86_64-unknown-linux-gnu.tar.gz | tar xz --directory=bin | |
sudo install "$(pwd)/bin/gh-stats" /usr/local/bin | |
- name: ⏬ Install wasm-pack | |
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh | |
- name: ⏬ Install tinysearch | |
run: | | |
set -e | |
curl -sSL https://github.com/tinysearch/tinysearch/releases/download/v0.8.2/tinysearch-v0.8.2-x86_64-unknown-linux-gnu.tar.gz | tar xz | |
sudo install "$(pwd)/tinysearch" /usr/local/bin | |
- name: ⏬ Install cavif | |
run: | | |
set -e | |
curl -sSL https://github.com/kornelski/cavif-rs/releases/download/v1.3.3/cavif-1.3.3.zip --output cavif.zip | |
unzip cavif.zip -d cavif | |
sudo install "$(pwd)/cavif/linux-generic/cavif" /usr/local/bin | |
- name: ⏬ Install cwebp | |
run: sudo apt-get update && sudo apt-get install -y webp | |
- name: ⏬ Install binaryen | |
run: | | |
set -e | |
curl -L https://github.com/WebAssembly/binaryen/releases/download/version_104/binaryen-version_104-x86_64-linux.tar.gz | tar xzf - | |
sudo install "$(pwd)/binaryen-version_104/bin/wasm-opt" /usr/local/bin | |
- name: ⏬ Install terser | |
run: sudo npm install -g terser | |
# Ideally we'd install ImageMagick 7 here because it provides the new `magick` binary that we later. | |
# However it's quite tedious to do right now, see | |
# https://github.com/walterbm/rusty-resizer/blob/33295758168171d3ad022e9e4938525f2d264017/.github/workflows/ci.yml#L13-L27 | |
# Instead, we just alias the old binary name to the new one because we don't use any of the new functionality. | |
- name: 🔗 Alias ImageMagick | |
run: sudo ln -s /usr/bin/convert /usr/bin/magick | |
- name: 🔍 Tool versions | |
run: make versions | |
- name: 🏞 Images | |
run: make images | |
- name: 📖 Build | |
run: make build | |
env: | |
GITHUB_TOKEN: ${{ secrets.PERSONAL_TOKEN }} | |
- name: 🤠 Publish | |
if: github.ref == 'refs/heads/master' | |
uses: cloudflare/[email protected] | |
with: | |
apiToken: ${{ secrets.CF_API_TOKEN }} |