Deploy #578
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: main | |
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 | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- name: Setup Pages | |
id: pages | |
uses: actions/configure-pages@v3 | |
- name: Checkout repo | |
uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- 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@v1 | |
with: | |
path: _site | |
- name: Deploy to GitHub Pages | |
if: > | |
success() | |
&& github.ref == 'refs/heads/main' | |
&& github.repository == 'tac-hep/tac-hep.github.io' | |
id: deployment | |
uses: actions/deploy-pages@v2 |