Skip to content

Commit

Permalink
disable CI workflow as mailadm.testrun.org was taken down
Browse files Browse the repository at this point in the history
  • Loading branch information
missytake committed Sep 3, 2024
1 parent 141543a commit 47011b9
Showing 1 changed file with 30 additions and 30 deletions.
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 }}/"
# })

0 comments on commit 47011b9

Please sign in to comment.