-
Notifications
You must be signed in to change notification settings - Fork 108
45 lines (41 loc) · 1.46 KB
/
publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# 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.1
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