Skip to content

add more info for activities; update caps chair #49

add more info for activities; update caps chair

add more info for activities; update caps chair #49

Workflow file for this run

# Workflow for building and deploying a preview of the Hugo site for a pull request
name: Deploy Preview
on:
# Runs on pull requests targeting the main branch
pull_request_target:
branches:
- main
# Sets permissions of the GitHub TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow one concurrent deployment per pull request, and cancel in-progress runs.
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
# Default to bash
defaults:
run:
shell: bash
jobs:
# Build job
build:
runs-on: ubuntu-latest
outputs:
preview_url: ${{ steps.base_url.outputs.base_url }}
env:
HUGO_VERSION: 0.148.2
steps:
- name: Install Hugo CLI
run: |
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
- name: Install Dart Sass Embedded
run: sudo snap install dart-sass-embedded
- name: Setup Pages
id: pages
uses: actions/configure-pages@v5
# Build production site from base branch
- name: Checkout base branch
uses: actions/checkout@v4
with:
ref: ${{ github.base_ref }}
path: base
submodules: recursive
- name: Install Node.js dependencies for base
working-directory: base
run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true"
- name: Build production site
env:
HUGO_ENVIRONMENT: production
HUGO_ENV: production
run: |
hugo \
--source base \
--minify \
--baseURL "${{ steps.pages.outputs.base_url }}/" \
--destination "${{ github.workspace }}/public"
# Build PR preview
- name: Checkout PR branch
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
path: pr
submodules: recursive
- name: Install Node.js dependencies for PR
working-directory: pr
run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true"
- name: Set preview baseURL
id: base_url
run: echo "base_url=${{ steps.pages.outputs.base_url }}/pr-${{ github.event.number }}" >> $GITHUB_OUTPUT
- name: Build PR preview
env:
HUGO_ENVIRONMENT: production
HUGO_ENV: production
run: |
hugo \
--source pr \
--minify \
--baseURL "${{ steps.base_url.outputs.base_url }}/" \
--destination "${{ github.workspace }}/public/pr-${{ github.event.number }}"
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./public
# Deployment job
deploy:
environment:
name: github-pages
url: ${{ needs.build.outputs.preview_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
add-comment:
runs-on: ubuntu-latest
needs: [build, deploy]
permissions:
pull-requests: write
steps:
- name: Add preview URL to PR
uses: peter-evans/create-or-update-comment@v4
with:
issue-number: ${{ github.event.pull_request.number }}
body: | # This is a multiline string, so newlines are preserved correctly.
Preview deployed at: ${{ needs.build.outputs.preview_url }}