Archive a single site #53
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: "Archive a single site" | |
on: | |
workflow_dispatch: | |
inputs: | |
source: | |
description: 'Site handle' | |
required: true | |
type: string | |
post: | |
description: 'Post' | |
required: true | |
type: boolean | |
default: false | |
jobs: | |
archive-site: | |
name: Archive site | |
uses: palewire/news-homepages-runner/.github/workflows/reusable-archive-single.yaml@main | |
with: | |
source: ${{ inputs.source }} | |
secrets: inherit | |
post: | |
name: Post | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
needs: [archive-site] | |
if: inputs.post == true | |
steps: | |
- id: checkout | |
name: Checkout | |
uses: actions/checkout@v3 | |
- id: install | |
name: Install Python dependencies | |
uses: ./.github/actions/install | |
- uses: actions/download-artifact@v3 | |
with: | |
name: screenshots | |
path: ./_dist | |
- id: toot | |
name: Toot | |
uses: ./.github/actions/toot | |
with: | |
command: single ${{ inputs.source }} -i ./_dist | |
client-key: ${{ secrets.MASTODON_CLIENT_KEY }} | |
client-secret: ${{ secrets.MASTODON_CLIENT_SECRET }} | |
access-token: ${{ secrets.MASTODON_ACCESS_TOKEN }} | |
- id: telegram | |
name: Telegram | |
uses: ./.github/actions/telegram | |
if: ${{ always() }} | |
with: | |
command: single ${{ inputs.source }} -i ./_dist | |
api-key: ${{ secrets.TELEGRAM_API_KEY }} |