marge:0.1.0 (#1289) #1125
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy | |
on: | |
push: | |
branches: [main] | |
# Don't deploy two commits in parallel | |
concurrency: | |
group: deploy | |
jobs: | |
deploy: | |
name: Deploy | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
# Download the whole history for the package timestamps | |
fetch-depth: 0 | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: Swatinem/rust-cache@v2 | |
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@v1 | |
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' \ | |
--cache-control 'must-revalidate' --put-md5 | |
- name: Log in to Azure | |
uses: azure/login@v2 | |
with: | |
creds: ${{ secrets.AZURE_PACKAGE_CREDENTIALS }} | |
- name: Purge CDN endpoint | |
uses: azure/CLI@v2 | |
with: | |
inlineScript: az afd endpoint purge -g Landing-Page --profile-name LandingPage --content-paths '/*' --endpoint-name 'packages' | |
- name: logout | |
run: az logout | |
if: always() |