-
Notifications
You must be signed in to change notification settings - Fork 12
52 lines (50 loc) · 1.36 KB
/
deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
on:
push:
branches:
- main
schedule:
# run every day at 1 AM
- cron: '0 1 * * *'
# Stops the running workflow of previous pushes
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
name: Build and deploy GH Pages
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
# needs the package-lock.json file
# cache: 'npm'
- name: Install npm dependencies
run: npm install
- name: Build npm
env:
NODE_ENV: production
run: npm run build
- name: Download crates.io db dump
id: download-crates-io-dump
uses: carlosperate/download-file-action@v1
with:
file-url: 'https://static.crates.io/db-dump.tar.gz'
location: './.tmp'
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Run crates.io DB dump scraper
uses: actions-rs/cargo@v1
with:
command: run
# args: --release --all-features
- name: Build Zola and deploy
uses: shalzz/[email protected]
env:
# Target branch
PAGES_BRANCH: gh-pages
# Provide personal access token
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}