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

Configure previews with access tokens and check out to fork #24

Merged
merged 2 commits into from
May 31, 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
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 @@ -16,9 +16,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
Loading