Skip to content

Commit 2d3b8bb

Browse files
committed
Update Xranklin and allow building website in all PRs
Deployment will happen only for PRs opened from the same repository.
1 parent a2aae0b commit 2d3b8bb

File tree

3 files changed

+24
-17
lines changed

3 files changed

+24
-17
lines changed

.github/workflows/Deploy.yml

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,40 +13,53 @@ concurrency:
1313
cancel-in-progress: true
1414

1515
jobs:
16-
preview:
16+
options:
17+
name: "Set options"
1718
runs-on: ubuntu-latest
1819
outputs:
19-
preview: ${{ steps.set-preview.outputs.preview }}
20+
deploy: ${{ steps.set-options.outputs.deploy }}
21+
preview: ${{ steps.set-options.outputs.preview }}
2022
steps:
21-
- name: Set Preview
22-
id: set-preview
23+
- name: Set options
24+
id: set-options
2325
run: |
26+
# Deploy only if the PR was opened on the same repository
27+
if [[ ${{ github.repository }} == ${{ github.event.pull_request.head.repo.full_name }} ]]; then
28+
DEPLOY="true"
29+
else
30+
DEPLOY="false"
31+
fi
32+
# Create previews only for pull requests
2433
if [[ ${{ github.event_name }} == "pull_request" ]]; then
2534
PREVIEW="previews/PR${PRNUM}"
2635
else
2736
PREVIEW=""
2837
fi
38+
echo "deploy=${DEPLOY}"
39+
echo "deploy=${DEPLOY}" >> "${GITHUB_OUTPUT}"
2940
echo "preview=${PREVIEW}"
3041
echo "preview=${PREVIEW}" >> "${GITHUB_OUTPUT}"
3142
env:
3243
PRNUM: ${{ github.event.number }}
3344

3445
deploy:
35-
needs: preview
46+
needs: options
3647
runs-on: ubuntu-latest
3748
permissions: write-all
3849
steps:
3950
- uses: actions/checkout@v3
4051
- uses: julia-actions/cache@v1
41-
- uses: tlienart/[email protected]
42-
if: github.event_name != 'pull_request' || github.repository == github.event.pull_request.head.repo.full_name # if this build is NOT a PR build, OR if this build is a PR build and the PR is NOT from a fork
52+
- uses: tlienart/[email protected]
4353
with:
4454
# NOTE: this is the Xranklin branch the site is built with
4555
BRANCH: "dev"
4656
# NOTE: this is the base URL prefix (landing page at /$BASE_URL_PREFIX/)
4757
BASE_URL_PREFIX: ""
58+
# Whether to deploy the website or not. Can do only for PRs opened
59+
# from the same repository.
60+
DEPLOY: ${{ needs.options.outputs.deploy }}
4861
# Directory where to deploy the website.
49-
PREVIEW: ${{ needs.preview.outputs.preview }}
62+
PREVIEW: ${{ needs.options.outputs.preview }}
5063

5164
# ===================================================================
5265
# DON'T CHANGE THE FOLLOWING UNLESS YOU HAVE GOOD REASONS TO

Manifest.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee"
4646

4747
[[deps.FranklinParser]]
4848
deps = ["REPL"]
49-
git-tree-sha1 = "21720fb3fb3ee04f9c1cb29944744d5dade2baa9"
49+
git-tree-sha1 = "4481c8e3ff70de9665737d897a0345172d80e92e"
5050
uuid = "796511e7-1510-466f-ad0c-1823c64bcafa"
51-
version = "0.6.1"
51+
version = "0.6.2"
5252

5353
[[deps.HTTP]]
5454
deps = ["Base64", "CodecZlib", "Dates", "IniFile", "Logging", "LoggingExtras", "MbedTLS", "NetworkOptions", "OpenSSL", "Random", "SimpleBufferStream", "Sockets", "URIs", "UUIDs"]
@@ -234,7 +234,7 @@ uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5"
234234

235235
[[deps.Xranklin]]
236236
deps = ["CRC32c", "Dates", "FranklinParser", "IOCapture", "LiveServer", "Logging", "OrderedCollections", "Pkg", "REPL", "Serialization", "TOML", "URIs"]
237-
git-tree-sha1 = "c670f07826b330c83893ef753ed2ad44ae801ef3"
237+
git-tree-sha1 = "bdb8eb5161f6dff07c997ea8713973040007fd49"
238238
repo-rev = "main"
239239
repo-url = "https://github.com/tlienart/Xranklin.jl.git"
240240
uuid = "558449b0-171e-4e1f-900f-d076a5ddf486"

resources/index.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,6 @@ Some of the papers using Julia in HPC, including the JuliaParallel software stac
7777
on Cluster Computing (CLUSTER), 2022, pp. 549-555,
7878
[doi:10.1109/CLUSTER51413.2022.00072](https://doi.org/10.1109/CLUSTER51413.2022.00072),
7979
[arXiv:2207.12762](https://arxiv.org/abs/2207.12762).
80-
<!-- For some reason Xranklin seems to duplicate the character after the last `)` if it's
81-
only one, so we put something else to work around this bug. -->
8280

8381
### 2021
8482

@@ -94,8 +92,6 @@ Some of the papers using Julia in HPC, including the JuliaParallel software stac
9492
* S. Byrne, L. C. Wilcox and V. Churavy, (2021). **MPI.jl: Julia bindings for the Message
9593
Passing Interface**. JuliaCon Proceedings, 1(1), 68,
9694
[doi:10.21105/jcon.00068](https://doi.org/10.21105/jcon.00068).
97-
<!-- For some reason Xranklin seems to duplicate the character after the last `)` if it's
98-
only one, so we put something else to work around this bug. -->
9995

10096
### 2020 and older
10197

@@ -114,8 +110,6 @@ Some of the papers using Julia in HPC, including the JuliaParallel software stac
114110
Distributed Computing, Volume 127, 2019, Pages 89-104,
115111
[doi:10.1016/j.jpdc.2018.12.008](https://doi.org/10.1016/j.jpdc.2018.12.008),
116112
[arXiv:1801.10277](https://arxiv.org/abs/1801.10277).
117-
<!-- For some reason Xranklin seems to duplicate the character after the last `)` if it's
118-
only one, so we put something else to work around this bug. -->
119113

120114
## Using Julia in HPC facilities
121115

0 commit comments

Comments
 (0)