-
Notifications
You must be signed in to change notification settings - Fork 14
49 lines (46 loc) · 1.25 KB
/
deploy.yml
File metadata and controls
49 lines (46 loc) · 1.25 KB
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
on:
push:
branches:
- main
schedule:
# run every day at 1 AM
- cron: '0 1 * * *'
workflow_dispatch:
# 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@v6
- uses: actions/setup-node@v6
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@v2
with:
file-url: 'https://static.crates.io/db-dump.tar.gz'
location: './.tmp'
- uses: dtolnay/rust-toolchain@stable
- name: Run crates.io DB dump scraper
run: cargo run
- name: Build Zola and deploy
uses: shalzz/zola-deploy-action@v0.21.0
env:
# Target branch
PAGES_BRANCH: gh-pages
# Provide personal access token
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}