Skip to content

Change: PDF Generation #20

Change: PDF Generation

Change: PDF Generation #20

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: Deploy Rust App to Azure Function
on:
push:
branches:
- master
env:
AZURE_FUNCTIONAPP_NAME: fn-rust-pdf-generator # set this to your application's name, it has to be unique
AZURE_GROUP_NAME: fnrustpdfgenerator
AZURE_FUNCTIONAPP_PACKAGE_PATH: '.' # set this to the path to your web app project, defaults to the repository root
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: "Checkout GitHub action"
uses: actions/checkout@v4
- name: Install with RustUp
shell: bash
run: curl https://sh.rustup.rs -sSf | sh -s -- -y
- name: Install musl
run: sudo apt-get install -y --no-install-recommends musl-tools
- name: Add Linux MUSL Target
shell: bash
run: rustup target add x86_64-unknown-linux-musl
- name: Build release
shell: bash
run: cargo build --release --target=x86_64-unknown-linux-musl
- name: Copy handler to parent directory
shell: bash
run: cp target/x86_64-unknown-linux-musl/release/handler .
# See https://github.com/Azure/azure-functions-core-tools#linux
- name: Setup the repository
shell: bash
run: |
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
sudo mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg
sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-$(lsb_release -cs)-prod $(lsb_release -cs) main" > /etc/apt/sources.list.d/dotnetdev.list'
- name: Install Azure Core Tools
shell: bash
run: |
sudo apt-get update
sudo apt-get install azure-functions-core-tools-4
- name: Azure Login
uses: azure/#@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: Deploy to Azure Functions
shell: bash
run: |
func azure functionapp publish ${{ env.AZURE_FUNCTIONAPP_NAME }} --custom