Skip to content

check, build, deploy hpc-carpentry.org #1368

check, build, deploy hpc-carpentry.org

check, build, deploy hpc-carpentry.org #1368

---
name: check, build, deploy hpc-carpentry.org
on:
push:
branches: main
schedule:
- cron: "0 8 * * *"
jobs:
build-website:
if: github.repository_owner == 'hpc-carpentry'
runs-on: ubuntu-latest
# Set permissions for GITHUB_TOKEN to write to the repo
# (it needs to be able to write to the gh_pages branch)
permissions:
contents: write
defaults:
run:
shell: bash
steps:
- name: Checkout the Repository
uses: actions/checkout@master
- name: Setup Ruby, JRuby and TruffleRuby
uses: ruby/setup-ruby@v1
with:
ruby-version: '2.7'
- name: Install yaml-lint
run: |
gem install yaml-lint
- name: Lint _config.yml with yaml-lint
run: |
yaml-lint _config.yml
- name: Lint pages and blog posts
run: |
yaml-lint -q -n $(find _posts -regex ".*.md\|.*html") &&\
yaml-lint -q -n $(find pages -regex ".*.md\|.*html")
- name: Setup EESSI to give us R and Python modules
uses: eessi/github-action-eessi@v3
with:
eessi_stack_version: '2023.06'
- name: Create repository data files
shell: bash
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
run: |
module load R/4.3.2-gfbf-2023a
module load R-bundle-CRAN/2023.12-foss-2023a
module load SciPy-bundle/2023.07-gfbf-2023a
make data
# - name: Create PDF file of some pages
# uses: docker://pandoc/latex:latest
# with:
# args: >
# --output files/pdf/online-workshop-recommendations.pdf
# --pdf-engine=xelatex
# -V geometry:margin=1in
# pages/online-workshop-recommendations.md
- name: Build and deploy gh-pages branch
uses: helaili/jekyll-action@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
target_branch: 'gh-pages'