Skip to content

Website

Website #11

Workflow file for this run

name: Website
on:
push:
branches:
- main
paths:
- "web/**"
workflow_dispatch:
defaults:
run:
working-directory: web
jobs:
build:
name: Build Website
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
sparse-checkout: web
- name: Setup Volta
uses: volta-cli/action@v3
- name: Install dependencies
uses: trufflehq/truffle-packages/actions/yarn@main
with:
working-directory: web
- name: Build website
env:
NEXT_PUBLIC_PLAUSIBLE_DOMAIN: ${{ vars.NEXT_PUBLIC_PLAUSIBLE_DOMAIN }}
NEXT_PUBLIC_PLAUSIBLE_LOCATION: ${{ vars.NEXT_PUBLIC_PLAUSIBLE_LOCATION }}
NEXT_PUBLIC_MEILISEARCH_ADDRESS: ${{ vars.NEXT_PUBLIC_MEILISEARCH_ADDRESS }}
NEXT_PUBLIC_MEILISEARCH_CRATES_INDEX_UID: ${{ vars.NEXT_PUBLIC_MEILISEARCH_CRATES_INDEX_UID }}
NEXT_PUBLIC_MEILISEARCH_API_KEY: ${{ vars.NEXT_PUBLIC_MEILISEARCH_API_KEY }}
NEXT_PUBLIC_METADATA_BASE: ${{ vars.NEXT_PUBLIC_METADATA_BASE }}
run: yarn build
- name: Bundle
run: cd out && tar -czvf ../web-$GITHUB_SHA.tar.gz .
- name: Upload to Seiten
uses: sycertech/seiten/action@main
with:
url: ${{ secrets.SEITEN_HOST }}
gpg-key: ${{ secrets.SEITEN_GPG_PRIVATE_KEY }}
archive: web/web-$GITHUB_SHA.tar.gz
path: crates.pm
# - name: Releasing assets
# uses: actions/upload-artifact@v3
# with:
# path: web/web*.tar.gz
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}