-
Notifications
You must be signed in to change notification settings - Fork 50
Automation/blog pipeline #718
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
nora-weisser
merged 10 commits into
Women-Coding-Community:main
from
nora-weisser:automation/blog-pipeline
Jul 8, 2026
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
6a944c5
Small bug fix so that the --- is on the first line
nodwells b62cc3c
Update blog post html with info from spreadsheet
nodwells 2f5ca79
Add file for retrieving the blog information from csv
nodwells b0917ad
Add GitHub Actions workflow and update main blog_exporter script to u…
nodwells 6aea9cb
Add pytest for the image download
nodwells 4a22818
feat: implemented missing parts for blog automation
nora-weisser dba8182
feat: added requirements installation
nora-weisser e2c5370
prepared pipeline for testing
nora-weisser 6f33e71
feat: reverted
nora-weisser 38d7ba8
feat: resolved comments
nora-weisser File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,76 @@ | ||
| name: Publish reviewed blogs | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| schedule: | ||
| - cron: '0 7 * * 1' # weekly on Mondays at 07:00 UTC: publish newly reviewed blogs | ||
|
|
||
| jobs: | ||
| publish-blogs: | ||
| if: github.repository == 'Women-Coding-Community/WomenCodingCommunity.github.io' | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v5 | ||
|
|
||
| - name: Set up Python | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: '3.12' | ||
|
|
||
| - name: Cache pip | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: ~/.cache/pip | ||
| key: ${{ runner.os }}-pip-blog-${{ hashFiles('tools/blog_automation/requirements.txt') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-pip-blog- | ||
|
|
||
| - name: Install dependencies | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| pip install -r tools/blog_automation/requirements.txt | ||
|
|
||
| - name: Write service account key | ||
| run: echo "$SERVICE_ACCOUNT_KEY" > tools/blog_automation/service_account_key.json | ||
| env: | ||
| SERVICE_ACCOUNT_KEY: ${{ secrets.BLOG_AUTOMATION_SERVICE_ACCOUNT }} | ||
|
|
||
| - name: Export reviewed blogs | ||
| run: | | ||
| cd tools/blog_automation | ||
| python publish_reviewed_blogs.py | ||
|
|
||
| - name: Remove service account key | ||
| if: always() | ||
| run: rm -f tools/blog_automation/service_account_key.json | ||
|
|
||
| - name: Create or Update Pull Request | ||
| id: create-pr | ||
| uses: peter-evans/create-pull-request@v7 | ||
| with: | ||
| token: ${{ secrets.GHA_ACTIONS_ALLOW_TOKEN }} | ||
| commit-message: "Automated import of reviewed blog posts" | ||
| branch: "automation/import-blog-${{ github.run_id }}" | ||
| team-reviewers: "Women-Coding-Community/leaders" | ||
| title: "Automated import of reviewed blog posts" | ||
| body: | | ||
| This PR was created automatically by a GitHub Action. | ||
|
|
||
| It contains every blog marked `isReviewedandApproved` (and not yet | ||
| `isPublished`) in the submissions spreadsheet: | ||
| - new posts under `_posts/` | ||
| - cover images under `assets/images/blog/` | ||
|
|
||
| The spreadsheet's `isPublished` column has already been set to TRUE for | ||
|
dricazenck marked this conversation as resolved.
|
||
| these rows. Please review the rendered posts before merging. | ||
|
|
||
| If you close this PR **without merging**, reset `isPublished` to | ||
| FALSE in the spreadsheet for these rows — otherwise they won't be | ||
| re-exported and the blogs will be silently dropped. | ||
| labels: | | ||
| automation | ||
| add-paths: | | ||
| _posts/** | ||
| assets/images/blog/** | ||
This file contains hidden or 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.