Skip to content

feat: C2PA PDF support #54

feat: C2PA PDF support

feat: C2PA PDF support #54

Workflow file for this run

name: "Build and publish"
on:
pull_request:
types:
- closed
branches:
- main
jobs:
build-and-publish:
if: ${{ github.event.pull_request.merged && startsWith(github.event.pull_request.head.ref, 'bump-') }}
name: Build and publish unified package
runs-on: ubuntu-latest
permissions:
contents: read
pages: write
packages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@v4
- name: Install Nix
uses: nixbuild/nix-quick-install-action@v28
- name: Activate Nix cache
uses: nix-community/cache-nix-action@v5
with:
primary-key: nix-${{ runner.os }}-${{ hashFiles('**/*.nix', 'flake.lock', '**/Cargo.lock', '**/yarn.lock') }}
restore-prefixes-first-match: nix-${{ runner.os }}-
gc-max-store-size: 2684354560 # 2.5 GB
- name: Install Node
uses: actions/setup-node@v4
with:
node-version: latest
registry-url: https://registry.npmjs.org
- name: Build unified package
run: nix build
- name: Publish unified package
run: npm publish --access public
working-directory: ./result
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}
- name: Build documentation
run: nix build .#docs
- name: Upload documentation artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./result
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4