1
0
mirror of https://github.com/bitwarden/help synced 2025-12-24 04:04:27 +00:00
Files
help/.github/workflows/build.yml
David Choi 5c13c65b73 removing article from slug and updating width and footer (#139)
* removing article from slug and updating width and footer

* ruby plugin for redirects

* removing help article slug

* help article clean up

* relative url
2020-08-04 13:24:37 -05:00

55 lines
1.3 KiB
YAML

name: Build
on: push
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Set up Node
uses: actions/setup-node@v1
with:
node-version: '10.x'
- name: Set up Ruby
uses: actions/setup-ruby@v1
with:
ruby-version: 2.6
- name: Set up Jekyll
run: gem install bundler jekyll
- name: Print environment
run: |
node --version
npm --version
ruby --version
jekyll --version
- name: Checkout repo
uses: actions/checkout@v2
- name: Install Node dependencies
run: npm install
- name: Build site
if: github.ref != 'refs/heads/master'
run: npm run build:prod
- name: Build site for S3
if: github.ref == 'refs/heads/master'
run: npm run build:prod:sub
- name: Deploy to S3
if: github.ref == 'refs/heads/master'
uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read --follow-symlinks --delete
env:
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: 'us-east-1'
SOURCE_DIR: '_site'
DEST_DIR: 'help'