Skip to content

Commit 302d3d3

Browse files
committed
ci: move to direct pages deploy
Signed-off-by: Henry Schreiner <[email protected]>
1 parent 906047a commit 302d3d3

File tree

4 files changed

+27
-21
lines changed

4 files changed

+27
-21
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,9 @@ jobs:
1818
uses: ./.github/actions/prepare-build-site
1919

2020
- name: Check RuboCop
21-
shell: bash
2221
run: bundle exec rake rubocop
2322

2423
- name: Build the site
25-
shell: bash
2624
run: bundle exec rake build
2725
env:
2826
JEKYLL_ENV: production

.github/workflows/deploy.yml

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,35 @@ on:
88
- cron: "0 0 * * *"
99

1010
concurrency:
11-
group: gha-deploy
11+
group: pages
1212
cancel-in-progress: true
1313

14+
permissions:
15+
contents: read
16+
pages: write
17+
id-token: write
18+
1419
jobs:
1520
website:
1621
runs-on: ubuntu-latest
22+
environment:
23+
name: github-pages
24+
url: ${{ steps.deployment.outputs.page_url }}
25+
1726
steps:
27+
- name: Setup Pages
28+
id: pages
29+
uses: actions/configure-pages@v2
1830

1931
- uses: actions/checkout@v3
2032

2133
- name: Prepare to build site
2234
uses: ./.github/actions/prepare-build-site
2335

2436
- name: Check RuboCop
25-
shell: bash
2637
run: bundle exec rake rubocop
2738

2839
- name: Build the site
29-
shell: bash
3040
run: bundle exec rake build
3141
env:
3242
JEKYLL_ENV: production
@@ -35,20 +45,15 @@ jobs:
3545
- name: Check for issues
3646
run: bundle exec rake checkonly || true
3747

38-
- name: Write new README for output repo
39-
run: |
40-
echo "# WARNING: Do not edit this generated repository; edit [iris-hep.github.io-source](https://github.com/iris-hep/iris-hep.github.io-source) instead!" > _site/README.md
48+
- name: Upload artifact
49+
uses: actions/upload-pages-artifact@v1
50+
with:
51+
path: _site
4152

42-
- name: Deploy
53+
- name: Deploy to GitHub Pages
4354
if: >
4455
success()
4556
&& github.ref == 'refs/heads/master'
46-
&& github.repository == 'iris-hep/iris-hep.github.io-source'
47-
uses: peaceiris/actions-gh-pages@v3
48-
with:
49-
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
50-
external_repository: iris-hep/iris-hep.github.io
51-
publish_branch: master
52-
publish_dir: _site
53-
force_orphan: true
54-
cname: iris-hep.org
57+
&& github.repository == 'iris-hep/iris-hep.github.io'
58+
id: deployment
59+
uses: actions/deploy-pages@v1

CNAME

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
iris-hep.org

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
1-
[![CI](https://github.com/iris-hep/iris-hep.github.io-source/actions/workflows/ci.yml/badge.svg)](https://github.com/iris-hep/iris-hep.github.io-source/actions/workflows/ci.yml)
1+
[![CI](https://github.com/iris-hep/iris-hep.github.io/actions/workflows/deploy.yml/badge.svg)](https://github.com/iris-hep/iris-hep.github.io/actions/workflows/deploy.yml)
22

33
Is this badge red? Click on it to find out what's wrong with the repository...
44

5-
# iris-hep.org Website Source
5+
# iris-hep.org Website
66

77
GitHub pages for IRIS-HEP project website.
88

9-
Do not make a PR to the output repository directly! Instead, make pull requests to the [iris-hep.github.io-source repository](https://github.com/iris-hep/iris-hep.github.io-source/). The advantage of making a pull request instead of directly editing is that changes made via pull request will be tested to ensure that all is ok with your changes...
9+
Even if you have edit permissions, please make a pull request. The advantage of
10+
making a pull request instead of directly editing is that changes made via pull
11+
request will be tested to ensure that all is ok with your changes...
1012

1113

1214
## Testing locally quick instructions (see [setup](https://iris-hep.org/docs/webdev) for full instructions):

0 commit comments

Comments
 (0)