Deploy #2621
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy | |
on: | |
workflow_dispatch: | |
push: | |
branches: [master] | |
schedule: | |
- cron: "0 0 * * *" | |
concurrency: | |
group: pages | |
cancel-in-progress: true | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
jobs: | |
website: | |
runs-on: ubuntu-latest | |
if: github.repository_owner == 'iris-hep' | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- name: Setup Pages | |
id: pages | |
uses: actions/configure-pages@v5 | |
- uses: actions/checkout@v4 | |
- name: Prepare to build site | |
uses: ./.github/actions/prepare-build-site | |
- name: Check RuboCop | |
run: bundle exec rake rubocop | |
- name: Build the site | |
run: bundle exec rake build | |
env: | |
JEKYLL_ENV: production | |
INDICO_TOKEN: ${{ secrets.INDICO_TOKEN }} | |
- name: Check for issues | |
run: bundle exec rake checkonly || true | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: _site | |
- name: Deploy to GitHub Pages | |
if: > | |
success() | |
&& github.ref == 'refs/heads/master' | |
&& github.repository == 'iris-hep/iris-hep.github.io' | |
id: deployment | |
uses: actions/deploy-pages@v4 |