generated from open-sdg/open-sdg-site-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (37 loc) · 1.03 KB
/
deploy-to-staging.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
name: Deploy to staging
on:
push:
branches:
- develop
repository_dispatch:
types: rebuild-staging
#schedule:
# - cron: '10 0 * * *'
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up Ruby 2.6
uses: ruby/setup-ruby@v1
with:
ruby-version: '2.6'
- name: Inject slug/short variables
uses: rlespinasse/[email protected]
- name: Set the REPOSITORY_URL_SITE environment variable
run: echo "REPOSITORY_URL_SITE=https://github.com/$GITHUB_REPOSITORY" >> $GITHUB_ENV
- name: Build the site
run: |
gem install bundler -v 2.4.22
bundle config path vendor/bundle
bundle install
bundle exec jekyll build --baseurl=/${{ env.GITHUB_REPOSITORY_NAME_PART }}
- name: Deploy to GitHub Pages
uses: JamesIves/[email protected]
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: _site
CLEAN: true