Skip to content
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
6 changes: 5 additions & 1 deletion .github/workflows/deploy-apps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@ jobs:

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: _site

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
uses: actions/deploy-pages@v4
with:
preview: false
43 changes: 13 additions & 30 deletions .github/workflows/deploy-pr-previews.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,40 +36,20 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./pr-preview
destination_dir: pr-${{ github.event.pull_request.number }}
keep_files: true
enable_jekyll: false

- name: Comment PR
uses: actions/github-script@v6
with:
script: |
const baseUrl = 'https://pollinations.github.io/hive/pr-${{ github.event.pull_request.number }}/';
const body = `🚀 PR Preview deployed!\n\nPreview URLs:\n- [Index Page](${baseUrl})\n`;

const comments = await github.rest.issues.listComments({
github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
body: `🚀 PR Preview deployed!\n\nPreview URL: ${baseUrl}`
});

const botComment = comments.data.find(comment =>
comment.user.login === 'github-actions[bot]' &&
comment.body.includes('PR Preview deployed!')
);

if (botComment) {
await github.rest.issues.updateComment({
owner: context.repo.owner,
repo: context.repo.repo,
comment_id: botComment.id,
body
});
} else {
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
body
});
}

cleanup:
if: github.event.action == 'closed'
Expand All @@ -80,11 +60,14 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: gh-pages

- name: Delete PR Preview
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./pr-preview
destination_dir: pr-${{ github.event.pull_request.number }}
force_orphan: true
run: |
rm -rf pr-${{ github.event.pull_request.number }}
git config user.name github-actions
git config user.email github-actions@github.com
git add -A
git commit -m "Remove PR preview for #${{ github.event.pull_request.number }}" || echo "No changes to commit"
git push
33 changes: 0 additions & 33 deletions .github/workflows/openhands-resolver.yml

This file was deleted.

96 changes: 0 additions & 96 deletions index.html

This file was deleted.

Loading
Loading