mirror of
https://github.com/immich-app/static-pages.git
synced 2026-09-30 13:23:05 +08:00
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
55 lines
1.9 KiB
YAML
55 lines
1.9 KiB
YAML
name: Import Outline post
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
post_url:
|
|
required: true
|
|
description: 'The URL of the post to import'
|
|
|
|
jobs:
|
|
import:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Generate a token
|
|
id: generate-token
|
|
uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2.2.1
|
|
with:
|
|
app-id: ${{ secrets.PUSH_O_MATIC_APP_ID }}
|
|
private-key: ${{ secrets.PUSH_O_MATIC_APP_KEY }}
|
|
|
|
- name: Checkout code
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
persist-credentials: false
|
|
ref: 'main'
|
|
|
|
- name: Install uv
|
|
uses: astral-sh/setup-uv@e06108dd0aef18192324c70427afc47652e63a82 # v7.5.0
|
|
|
|
- name: Setup pnpm
|
|
uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v4.4.0
|
|
|
|
- name: Import post
|
|
id: import
|
|
env:
|
|
OUTLINE_POST_URL: ${{ inputs.post_url }}
|
|
OUTLINE_API_KEY: ${{ secrets.OUTLINE_API_KEY }}
|
|
R2_BUCKET_NAME: ${{ secrets.STATIC_BUCKET_NAME }}
|
|
R2_ENDPOINT_URL: ${{ secrets.STATIC_BUCKET_ENDPOINT }}
|
|
R2_ACCESS_KEY_ID: ${{ secrets.STATIC_BUCKET_KEY_ID }}
|
|
R2_SECRET_ACCESS_KEY: ${{ secrets.STATIC_BUCKET_KEY_SECRET }}
|
|
R2_PUBLIC_URL: "https://static.immich.cloud"
|
|
run: uv run --script import-post.py
|
|
|
|
- name: Format
|
|
run: pnpm --filter root.immich.app run format:fix
|
|
|
|
- name: Create PR
|
|
uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v8.1.0
|
|
with:
|
|
token: ${{ steps.generate-token.outputs.token }}
|
|
add-paths: apps/root.immich.app/src/routes/blog
|
|
commit-message: "feat: import ${{ steps.import.outputs.slug }}"
|
|
title: "feat: import ${{ steps.import.outputs.slug }}"
|
|
branch: "blog/${{ steps.import.outputs.uuid }}"
|