Skip to content

Commit 1750b98

Browse files
authored
Dummy pr 2 (#120)
* remove unused files * - Simplify PR preview comment logic - Remove OpenHands resolver workflow * Update deploy workflows - Add path to upload artifact in deploy-apps.yml - Set preview to false in deploy to GitHub Pages - Enable keep_files and disable Jekyll in deploy-pr-previews.yml - Modify PR preview deletion to use shell script
1 parent ffe5a8e commit 1750b98

File tree

2 files changed

+16
-7
lines changed

2 files changed

+16
-7
lines changed

.github/workflows/deploy-apps.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,11 @@ jobs:
4040

4141
- name: Upload artifact
4242
uses: actions/upload-pages-artifact@v3
43+
with:
44+
path: _site
4345

4446
- name: Deploy to GitHub Pages
4547
id: deployment
46-
uses: actions/deploy-pages@v4
48+
uses: actions/deploy-pages@v4
49+
with:
50+
preview: false

.github/workflows/deploy-pr-previews.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ jobs:
3636
github_token: ${{ secrets.GITHUB_TOKEN }}
3737
publish_dir: ./pr-preview
3838
destination_dir: pr-${{ github.event.pull_request.number }}
39+
keep_files: true
40+
enable_jekyll: false
3941

4042
- name: Comment PR
4143
uses: actions/github-script@v6
@@ -58,11 +60,14 @@ jobs:
5860
steps:
5961
- name: Checkout
6062
uses: actions/checkout@v3
63+
with:
64+
ref: gh-pages
6165

6266
- name: Delete PR Preview
63-
uses: peaceiris/actions-gh-pages@v3
64-
with:
65-
github_token: ${{ secrets.GITHUB_TOKEN }}
66-
publish_dir: ./pr-preview
67-
destination_dir: pr-${{ github.event.pull_request.number }}
68-
force_orphan: true
67+
run: |
68+
rm -rf pr-${{ github.event.pull_request.number }}
69+
git config user.name github-actions
70+
git config user.email github-actions@github.com
71+
git add -A
72+
git commit -m "Remove PR preview for #${{ github.event.pull_request.number }}" || echo "No changes to commit"
73+
git push

0 commit comments

Comments
 (0)