Github Example Deployment #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
name: Deploy | |
on: | |
push: | |
branches: | |
- master | |
# For Testing Code Only | |
#on: pull_request | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
container: ruby:2.7.2 | |
environment: | |
name: github-pages | |
url: ${{steps.deployment.outputs.page_url}} | |
name: Build and Deploy Beer-Garden.io | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Cache Bundler | |
uses: actions/cache@v2 | |
with: | |
path: .cache/bundler | |
key: ${{ runner.os }}-bundler-${{ hashFiles('**/Gemfile.lock') }} | |
restore-keys: | | |
${{ runner.os }}-bundler | |
- name: Bundle Install | |
run: | | |
bundle config set path .cache/bundler | |
bundle install | |
- name: Build Site | |
run: rake gen[github] | |
env: | |
NOKOGIRI_USE_SYSTEM_LIBRARIES: true | |
- name: Upload Artifact | |
uses: actions/upload-pages-artifact@v2 | |
with: | |
# upload entire directory | |
path: 'public' | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v | |
# - name: Deploy to GitHub Pages | |
# uses: crazy-max/ghaction-github-pages@v2 | |
# with: | |
# target_branch: gh-pages | |
# build_dir: public | |
# env: | |
# GITHUB_TOKEN: ${{ secrets.BUILDBOT_PAGES }} | |
# - name: Deploy to GitHub Pages | |
# uses: crazy-max/ghaction-github-pages@v4 | |
# with: | |
# target_branch: gh-pages | |
# build_dir: public | |
# dry_run: true |