kanly token is white #103
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: Update assets | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
merge: | |
runs-on: ubuntu-latest | |
environment: safe | |
steps: | |
- name: Generate a token | |
id: generate-token | |
uses: actions/create-github-app-token@v1 | |
with: | |
app-id: ${{ vars.APP_ID }} | |
private-key: ${{ secrets.APP_PRIVATE_KEY }} | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
persist-credentials: false | |
token: ${{ steps.generate-token.outputs.token }} | |
- uses: oven-sh/setup-bun@v1 | |
- run: bun install | |
- run: npx playwright install chromium | |
- run: bun run generate | |
- run: bun run build-storybook --test | |
- run: bun run capture | |
- name: Compress PDF | |
uses: jy95/ghostscript-action@v1 | |
continue-on-error: true | |
with: | |
file: 'generated/book/rulebook/rulebook.pdf' | |
output: 'generated/book/rulebook/rulebook-optimized.pdf' | |
arbitrary-parameters: '-dCompatibilityLevel=1.4 -dEmbedAllFonts=true -dSubsetFonts=true -dColorImageDownsampleType=/Bicubic -dColorImageResolution=144 -dGrayImageDownsampleType=/Bicubic -dGrayImageResolution=144 -dMonoImageDownsampleType=/Bicubic -dMonoImageResolution=144' | |
- name: Commit changes | |
continue-on-error: true | |
id: commit | |
run: | | |
git add ./generated | |
git config --local user.name norbert [bot] | |
git config --local user.email [email protected] | |
git commit --no-verify -m "generate new assets [merge] by ${{ github.actor }} [skip ci]" | |
- name: Push changes | |
if: ${{ steps.commit.outcome == 'success' }} | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ steps.generate-token.outputs.token }} |