Skip to content

fix: correct link to incubation process. #325

fix: correct link to incubation process.

fix: correct link to incubation process. #325

Workflow file for this run

name: Website build and deploy
on:
push:
branches:
- main # Deploy branch
# Run on PRs, but only preview
pull_request:
types:
- opened
- reopened
- synchronize
- closed
# Allows to run this workflow manually from the Actions tab
workflow_dispatch:
# Allow only one concurrent deployment. However, do NOT cancel in-progress runs as we want to allow
# especially production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
# Set environment variables which will be used multiple times in the workflow
env:
hugo_version: "0.147.9"
source_dir: "."
artifact_name: "website"
condition_production: ${{ github.ref == 'refs/heads/main' }}
dir_preview_subdir: main-pr-${{ github.event.number }}
jobs:
# Build job
build:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
with:
submodules: recursive # Get submodules
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
- name: Setup Hugo
uses: peaceiris/actions-hugo@75d2e84710de30f6ff7268e08f310b60ef14033f # v3.0.0
with:
hugo-version: ${{ env.hugo_version }}
extended: true
- name: Build production site
run: hugo -s ${{ env.source_dir }}
if: env.condition_production == 'true'
- name: Build preview site
run: hugo -s ${{ env.source_dir }} -e staging --buildFuture --buildDrafts -b ${{ vars.WEB_DOMAIN_PREVIEW }}/${{ env.dir_preview_subdir }}/
if: github.event.pull_request
- name: Upload artifact
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: ${{ env.artifact_name }}
path: ${{ env.source_dir }}/public
include-hidden-files: true
retention-days: 1
deploy:
name: Deploy website
needs: build
runs-on: ubuntu-24.04
steps:
- uses: OpenRailAssociation/web-deployment-action@2fa024c9f567236188970b10849da0077911c225 # v1
with:
artifact_name: ${{ env.artifact_name }}
condition_production: ${{ env.condition_production }}
domain_production: https://openrailassociation.org
domain_preview: ${{ vars.WEB_DOMAIN_PREVIEW }}
dir_base: ${{ vars.WEB_DIR_BASE }}
dir_production: html
dir_preview_base: ${{ vars.WEB_DIR_PREVIEW_BASE }}
dir_preview_subdir: ${{ env.dir_preview_subdir }}
ssh_host: ${{ vars.WEB_SSH_HOST }}
ssh_user: ${{ vars.WEB_SSH_USER }}
ssh_key: ${{ secrets.SSH_KEY }}
linkchecker_exclude: "sncf.com,flatland.cloud"