diff --git a/.github/workflows/crates-index.yml b/.github/workflows/crates-index.yml index 96e273d..3458fc7 100644 --- a/.github/workflows/crates-index.yml +++ b/.github/workflows/crates-index.yml @@ -13,5 +13,8 @@ jobs: - uses: actions/checkout@v2 - run: | git fetch --no-tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/* + - name: Download crates.io dumped database + - run: | + wget -v https://static.crates.io/db-dump.tar.gz -O /data/db-dump.tar.gz - name: Deloy crates index run: ./scripts/deploy-crates-index.sh diff --git a/scripts/deploy-crates-index.sh b/scripts/deploy-crates-index.sh index 90795a8..46c0626 100755 --- a/scripts/deploy-crates-index.sh +++ b/scripts/deploy-crates-index.sh @@ -2,12 +2,13 @@ set -e CRATES_INDEX_PATH="/tmp/index.js" +CRATES_DATABASE_PATH="/data/db-dump.tar.gz" BRANCH="now" build() { echo "Starting building crates-index..." cd rust - RUST_BACKTRACE=full cargo run --release --bin crates-index ${CRATES_INDEX_PATH} + RUST_BACKTRACE=full cargo run --release --bin crates-index ${CRATES_DATABASE_PATH} ${CRATES_INDEX_PATH} echo "{\"version\": $(date +%s)}" > /tmp/version.json cd .. }