Skip to content

Commit a466c7f

Browse files
committed
Correctly apply rdoc prerequisite
It thought this didn't actually work but it seems it is necessary this way. Unclear why `enhance` worked for the docs workflow but not for pages
1 parent 20eca83 commit a466c7f

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

‎.github/workflows/github-pages.yml‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: GitHub pages
22

33
on:
4+
pull_request:
45
# Runs on pushes targeting the default branch
56
push:
67
branches:
@@ -23,7 +24,6 @@ concurrency:
2324

2425
jobs:
2526
build:
26-
if: github.repository == 'ruby/prism'
2727
runs-on: ubuntu-latest
2828
steps:
2929
- name: Checkout
@@ -44,8 +44,6 @@ jobs:
4444
- name: Setup Pages
4545
id: pages
4646
uses: actions/configure-pages@v6
47-
- name: Template source files
48-
run: bundle exec rake templates
4947
- name: Build with RDoc
5048
run: bundle exec rake rdoc
5149
- name: Build with Doxygen
@@ -63,6 +61,7 @@ jobs:
6361
path: doc
6462

6563
deploy:
64+
if: github.repository == 'ruby/prism'
6665
environment:
6766
name: github-pages
6867
url: ${{ steps.deployment.outputs.page_url }}

‎rakelib/rdoc.rake‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@ end
2929
%w[rdoc rerdoc rdoc:coverage].each do |name|
3030
# rdoc:coverage available in rdoc as a default gem since ruby 3.3 only
3131
next unless Rake::Task.task_defined?(name)
32-
Rake::Task[name].enhance(["compile"])
32+
Rake::Task[name].prerequisites.unshift("compile")
3333
end

0 commit comments

Comments
 (0)