Merge pull request #1361 from gocd/dependabot/bundler/pdf-reader-2.13.0 #482
This file contains 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: Build and Publish | |
on: | |
push: | |
branches: | |
- master | |
# Push events to branches matching refs/heads/release-* | |
- 'release-*' | |
env: | |
RUN_EXTERNAL_CHECKS: true | |
jobs: | |
complete_build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 3.3 | |
bundler-cache: true # would run bundle install | |
- name: Run the build | |
run: bundle exec rake static_checks:all | |
push_to_gh_pages: | |
needs: complete_build | |
runs-on: ubuntu-latest | |
env: | |
GITHUB_PASSWORD: "${{ secrets.GITHUB_TOKEN }}" | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 3.3 | |
bundler-cache: true # would run bundle install | |
- name: Set up user in git config | |
run: | | |
git config --global user.name "github-actions" | |
git config --global user.email "[email protected]" | |
- name: Set up upstream and publish to gh pages | |
run: | | |
git remote add upstream 'https://github-actions:${GITHUB_PASSWORD}@github.com/gocd/api.go.cd' | |
bundle exec rake publish --trace | |
env: | |
REMOTE_NAME: "upstream" | |
ALLOW_DIRTY: true | |
sync_to_s3: | |
needs: push_to_gh_pages | |
runs-on: ubuntu-latest | |
env: | |
S3_BUCKET: "${{ secrets.S3_BUCKET }}" | |
AWS_ACCESS_KEY_ID: "${{ secrets.AWS_ACCESS_KEY_ID }}" | |
AWS_SECRET_ACCESS_KEY: "${{ secrets.AWS_SECRET_ACCESS_KEY }}" | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 3.3 | |
bundler-cache: true # would run bundle install | |
- name: Upload to S3 | |
run: bundle exec rake upload_to_s3 |