Publish #100
This file contains hidden or 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
| # This workflow will build a middleman project with bundle | |
| name: Publish | |
| # Controls when the action will run. Workflow runs when manually triggered using the UI | |
| # or API. | |
| on: [ workflow_dispatch ] | |
| permissions: | |
| id-token: write | |
| contents: write | |
| jobs: | |
| build_and_release: | |
| 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.AWS_ROLE_TO_ASSUME }}" | |
| aws-region: "${{ secrets.AWS_REGION }}" | |
| - name: Set up upstream and publish to S3 | |
| env: | |
| BASE_URL: 'https://www.gocd.org' | |
| DEPLOY_ENVIRONMENT: 'live' | |
| AWS_BUCKET: "${{ secrets.AWS_BUCKET }}" | |
| RUN_EXTERNAL_CHECKS: false | |
| run: | | |
| bundle exec rake publish --trace |