Skip to content
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

Fix CI #305

Merged
merged 2 commits into from
Sep 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 30 additions & 30 deletions .github/workflows/jekyll.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Deploy Preview

on: [pull_request]
#on: [pull_request]

jobs:
build:
Expand Down Expand Up @@ -44,35 +44,35 @@ jobs:
mkdir -p "$HOME/.ssh"
echo "${{ secrets.KEY }}" > "$HOME/.ssh/key"
chmod 600 "$HOME/.ssh/key"
rsync -avzh -e "ssh -i $HOME/.ssh/key -o StrictHostKeyChecking=no" $GITHUB_WORKSPACE/_site/ "${{ secrets.USERNAME }}@mailadm.testrun.org:providerOverview/${{ steps.prepare.outputs.prid }}/"
# rsync -avzh -e "ssh -i $HOME/.ssh/key -o StrictHostKeyChecking=no" $GITHUB_WORKSPACE/_site/ "${{ secrets.USERNAME }}@mailadm.testrun.org:providerOverview/${{ steps.prepare.outputs.prid }}/"

- name: Post links to details
if: steps.prepare.outputs.uploadtoserver
id: details
run: |
# Post preview link to details.
GITHUB_API_URL="https://api.github.com/repos/deltachat/provider-db/statuses/${{ github.event.after }}"
PREVIEW_LINK="https://mailadm.testrun.org/provider/${{ steps.prepare.outputs.prid }}/"
STATUS_DATA="{\"state\": \"success\", \
\"description\": \"Preview the page here:\", \
\"context\": \"Page Preview\", \
\"target_url\": \"${PREVIEW_LINK}\"}"
curl -X POST --header "authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" --url "$GITHUB_API_URL" --header "content-type: application/json" --data "$STATUS_DATA"
# - name: Post links to details
# if: steps.prepare.outputs.uploadtoserver
# id: details
# run: |
# # Post preview link to details.
# GITHUB_API_URL="https://api.github.com/repos/deltachat/provider-db/statuses/${{ github.event.after }}"
# PREVIEW_LINK="https://mailadm.testrun.org/provider/${{ steps.prepare.outputs.prid }}/"
# STATUS_DATA="{\"state\": \"success\", \
# \"description\": \"Preview the page here:\", \
# \"context\": \"Page Preview\", \
# \"target_url\": \"${PREVIEW_LINK}\"}"
# curl -X POST --header "authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" --url "$GITHUB_API_URL" --header "content-type: application/json" --data "$STATUS_DATA"

# Check if the comment already exists.
GITHUB_API_URL="https://api.github.com/repos/deltachat/provider-db/issues/${{ steps.prepare.outputs.prid }}/comments"
RESPONSE=$(curl -L --header "authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" --url "$GITHUB_API_URL" --header "content-type: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28")
echo $RESPONSE > result
grep -v '"Check out the page preview at https://mailadm.testrun.org/' result && echo "comment=true" >> $GITHUB_OUTPUT || true
# # Check if the comment already exists.
# GITHUB_API_URL="https://api.github.com/repos/deltachat/provider-db/issues/${{ steps.prepare.outputs.prid }}/comments"
# RESPONSE=$(curl -L --header "authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" --url "$GITHUB_API_URL" --header "content-type: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28")
# echo $RESPONSE > result
# grep -v '"Check out the page preview at https://mailadm.testrun.org/' result && echo "comment=true" >> $GITHUB_OUTPUT || true

- name: Post link to comments
if: steps.details.outputs.comment
uses: actions/github-script@v6
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: "Check out the page preview at https://mailadm.testrun.org/provider/${{ steps.prepare.outputs.prid }}/"
})
# - name: Post link to comments
# if: steps.details.outputs.comment
# uses: actions/github-script@v6
# with:
# script: |
# github.rest.issues.createComment({
# issue_number: context.issue.number,
# owner: context.repo.owner,
# repo: context.repo.repo,
# body: "Check out the page preview at https://mailadm.testrun.org/provider/${{ steps.prepare.outputs.prid }}/"
# })
1 change: 1 addition & 0 deletions _providers/wkpb.de.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ server:
port: 465
username_pattern: EMAIL
before_login_hint: "Dies sind die gleichen Anmeldedaten wie bei Moodle und Abitur-Online."
skip_auto_test: true
last_checked: 2023-12
website: https://wkpb.de/
---
Expand Down
Loading