Skip to content

Commit

Permalink
Merge pull request #24 from brauliorivas/fix-previews-22
Browse files Browse the repository at this point in the history
Configure previews with access tokens and check out to fork
  • Loading branch information
kjvbrt authored May 31, 2024
2 parents 87295d6 + 1f6ef69 commit 23a1eb2
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 8 deletions.
24 changes: 18 additions & 6 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,37 @@ on:
- synchronize
- closed

permissions:
contents: write
pull-requests: write
jobs:
deploy-preview:
environment: github-pages
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- uses: actions/checkout@v3
- uses: rossjrw/pr-preview-action@v1
- name: Checkout PR
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}

- name: Deploy to GH-Pages
uses: rossjrw/pr-preview-action@v1
id: preview_step
if: contains(['opened', 'reopened', 'synchronize'], ${{ github.event.action }})
with:
source-dir: .
preview-branch: gh-pages
umbrella-dir: pr-preview
deploy-repository: "key4hep/dmx"
token: ${{ secrets.PR_TOKEN }}
action: auto
- uses: rossjrw/pr-preview-action@v1

- name: Remove preview
uses: rossjrw/pr-preview-action@v1
if: github.event.action == 'closed' && !github.event.pull_request.merged
with:
source-dir: .
preview-branch: gh-pages
umbrella-dir: pr-preview
deploy-repository: "key4hep/dmx"
token: ${{ secrets.PR_TOKEN }}
action: remove
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
<div id="input-modal" class="modal-background">
<div class="modal-content">

<p>Welcome to <span id="logo">
<p>¡Welcome to <span id="logo">
<span id="logo-d">d</span><span id="logo-m">m</span><span id="logo-x">X</span>
</span></p>
</span>!</p>

<div id="input-message">
</div>
Expand Down

0 comments on commit 23a1eb2

Please sign in to comment.