Add better social images including headline text #2101
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 | |
| on: | |
| push: | |
| branches: [master] | |
| pull_request: | |
| branches: [master] | |
| schedule: | |
| - cron: "0 18 1 * *" | |
| repository_dispatch: | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: ⏬ Install Rust toolchain | |
| run: | | |
| curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y | |
| source ~/.cargo/env | |
| rustup target add wasm32-unknown-unknown | |
| echo "$HOME/.cargo/bin" >> $GITHUB_PATH | |
| - name: ⏬ Install zola | |
| run: | | |
| set -e | |
| curl -sSL https://github.com/getzola/zola/releases/download/v0.22.1/zola-v0.22.1-x86_64-unknown-linux-gnu.tar.gz | tar xz | |
| sudo install "$(pwd)/zola" /usr/local/bin | |
| zola --version | |
| - 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.10.0/tinysearch-v0.10.0-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 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 | |
| - name: ⏬ Install ImageMagick | |
| run: sudo apt-get update && sudo apt-get install -y imagemagick | |
| # Ideally we'd install ImageMagick 7 here because it provides the new `magick` binary that we use 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: 🚀 Deploy to Cloudflare Pages | |
| if: github.ref == 'refs/heads/master' | |
| uses: cloudflare/pages-action@v1 | |
| with: | |
| apiToken: ${{ secrets.CF_API_TOKEN }} | |
| accountId: 1c71f27d6fa097a1576b4ffab9186fa8 | |
| projectName: endler-dev | |
| directory: ./public |