forked from typst/packages
-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (41 loc) · 1.56 KB
/
deploy.yml
File metadata and controls
50 lines (41 loc) · 1.56 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
50
name: Deploy
on:
push:
branches: [main]
# Don't deploy two commits in parallel
concurrency:
group: deploy
jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
environment: Deploy
permissions:
contents: read
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 #v6.0.1
with:
# Download the whole history for the package timestamps
fetch-depth: 0
- uses: dtolnay/rust-toolchain@4be9e76fd7c4901c61fb841f559994984270fce7 # stable channel
- uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v.2.8.2
with:
workspaces: bundler
- name: Build bundler
run: cargo build --release --manifest-path bundler/Cargo.toml
- name: Package
run: bundler/target/release/bundler
- uses: kheiakiyama/install-azcopy-action@13e9f2135934ba6d9dcec703be926f2b2e616471 # v1.0.8
with:
version: "v10"
creds: ${{ secrets.AZURE_PACKAGE_CREDENTIALS }}
- name: Sync files
env:
ACCOUNT_NAME: typstpackages
run: |
azcopy_v10 cp --recursive ./dist/* "https://$ACCOUNT_NAME.blob.core.windows.net/\$web" \
--overwrite true --exclude-pattern '*.json' \
--cache-control 'public, max-age=7776000' --put-md5
azcopy_v10 cp --recursive ./dist/* "https://$ACCOUNT_NAME.blob.core.windows.net/\$web" \
--overwrite true --include-pattern '*.json' --exclude-pattern '*index.full.json' \
--cache-control 'must-revalidate, max-age=600' --put-md5