Deploy to production #189
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
# **************************************************************************** | |
# NOTES: | |
# | |
# This is an example of a production deployment that uses GitHub Pages along | |
# with a second "production" GitHub organisation. If you prefer to implement | |
# your own workflow, or do not need production deployments, then you should | |
# delete this file. | |
# | |
# In order for this to work, you must replace PRODUCTION_ORGANISATION below | |
# with the name of your production GitHub organisation, under REPOSITORY_NAME. | |
# | |
# For example, if your production organisation is "my-stats-org", then use: | |
# | |
# REPOSITORY_NAME: my-stats-org/my-stats-org.github.io | |
# | |
# **************************************************************************** | |
name: Deploy to production | |
on: | |
push: | |
branches: | |
- master | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Deploy | |
uses: actions/checkout@v2 | |
with: | |
persist-credentials: false | |
- name: Set up Ruby 2.6 | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: '2.6' | |
- name: Build the site | |
run: | | |
gem install bundler -v 2.4.22 | |
bundle config path vendor/bundle | |
make install | |
make build.production | |
- name: Deploy to GitHub Pages | |
uses: JamesIves/[email protected] | |
with: | |
REPOSITORY_NAME: sustainabledevelopment-uk/sustainabledevelopment-uk.github.io | |
ACCESS_TOKEN: ${{ secrets.token }} | |
BRANCH: master | |
FOLDER: _site | |
CLEAN: true |