Publish #58
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: Publish | |
# Controls when the action will run. Workflow runs when manually triggered using the UI | |
# or API. | |
on: [ workflow_dispatch ] | |
env: | |
RUBYOPT: -W0 # needed to not print the warnings - makes the logs too big | |
jobs: | |
build_and_release: | |
runs-on: ubuntu-latest | |
env: | |
USER: "github-actions" | |
TOKEN: "${{ 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: false # true would run bundle install | |
- name: Set up user in git config | |
run: | | |
git config --global user.name "${USER}" | |
git config --global user.email "${USER}@github.com" | |
- name: Set up upstream and publish to gh pages | |
run: | | |
bundle config --local build.sassc --disable-march-tune-native | |
bundle install | |
git remote add real https://${USER}:${TOKEN}@github.com/gocd/www.go.cd.git | |
bundle exec rake publish --trace | |
env: | |
REMOTE_NAME: "real" | |
ALLOW_DIRTY: true | |
BASE_URL: 'https://www.gocd.org' | |
DEPLOY_ENVIRONMENT: 'live' | |
AWS_BUCKET: "${{ secrets.AWS_BUCKET }}" | |
AWS_ACCESS_KEY_ID: "${{ secrets.AWS_ACCESS_KEY_ID }}" | |
AWS_SECRET_ACCESS_KEY: "${{ secrets.AWS_SECRET_ACCESS_KEY }}" | |
RUN_EXTERNAL_CHECKS: false |