generated from open-sdg/open-sdg-site-starter
-
Notifications
You must be signed in to change notification settings - Fork 1
56 lines (50 loc) · 1.56 KB
/
deploy-to-production.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
46
47
48
49
50
51
52
53
54
55
56
# ****************************************************************************
# 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
repository_dispatch:
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: master
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
bundle install
JEKYLL_ENV=production bundle exec jekyll build --config _config.yml,_config_prod.yml
- name: Deploy to GitHub Pages
uses: JamesIves/[email protected]
with:
REPOSITORY_NAME: hagstofan/heimsmarkmid-prod
ACCESS_TOKEN: ${{ secrets.HAGSTOFA_PROD }}
BRANCH: main
FOLDER: _site
CLEAN: true