Skip to content

chore: clean-up download page #904

chore: clean-up download page

chore: clean-up download page #904

# This workflow will build a middleman project with bundle
name: Build and Preview
on:
push:
branches:
- master
permissions:
id-token: write
contents: read
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true
jobs:
complete_build:
runs-on: ubuntu-latest
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
with:
egress-policy: audit
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Set up Ruby
uses: ruby/setup-ruby@0dafeac902942906541bc140009cdbf32665b601 # v1.315.0
with:
bundler-cache: true
- name: Run the build
env:
RUN_EXTERNAL_CHECKS: true
run: bundle exec rake build --verbose
publish_preview:
needs: complete_build
runs-on: ubuntu-latest
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
with:
egress-policy: audit
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
fetch-depth: 0
- name: Set up Ruby
uses: ruby/setup-ruby@0dafeac902942906541bc140009cdbf32665b601 # v1.315.0
with:
bundler-cache: true
- name: Configure aws credentials
uses: aws-actions/configure-aws-credentials@254c19bd240aabef8777f48595e9d2d7b972184b # v6.2.1
with:
role-to-assume: "${{ secrets.PREVIEW_AWS_ROLE_TO_ASSUME }}"
aws-region: "${{ secrets.AWS_REGION }}"
- name: Set up upstream and publish to S3
env:
BASE_URL: 'https://preview.gocd.org'
DEPLOY_ENVIRONMENT: 'preview'
AWS_BUCKET: "${{ secrets.PREVIEW_AWS_BUCKET }}"
RUN_EXTERNAL_CHECKS: false
run: |
bundle exec rake publish --trace