Skip to content

Commit a536f72

Browse files
committed
We do need to deploy to guides too
1 parent b7edb99 commit a536f72

File tree

1 file changed

+70
-0
lines changed

1 file changed

+70
-0
lines changed

.github/workflows/guides.yml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# This is a basic workflow to help you get started with Actions
2+
3+
name: Deploy-guides
4+
5+
# Controls when the action will run. Triggers the workflow on push or pull request
6+
# events but only for the main branch
7+
on:
8+
push:
9+
branches:
10+
- main
11+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
12+
jobs:
13+
# This workflow contains a single job called "build"
14+
build:
15+
# The type of runner that the job will run on
16+
runs-on: ubuntu-latest
17+
18+
# Steps represent a sequence of tasks that will be executed as part of the job
19+
steps:
20+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
21+
- uses: actions/checkout@v2
22+
23+
- name: Setup ruby
24+
uses: ruby/setup-ruby@v1
25+
with:
26+
bundler-cache: true
27+
- run: gem install bundler
28+
29+
- uses: actions/cache@v4
30+
with:
31+
path: vendor/bundle
32+
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
33+
restore-keys: |
34+
${{ runner.os }}-gems-
35+
36+
# Build jekyll site
37+
- name: Build Jekyll
38+
run: .github/bin/build_jekyll.sh
39+
env:
40+
CONFIG: "--config _config.yml,_config_prod.yml"
41+
42+
# Deploy to live site
43+
- name: Create GitHub deployment
44+
uses: glenrobson/[email protected]
45+
id: deployment
46+
with:
47+
step: start
48+
token: ${{ secrets.GITHUB_TOKEN }}
49+
auto_inactive: 'false'
50+
env: production
51+
- name: Deploy to S3
52+
uses: glenrobson/[email protected]
53+
with:
54+
args: --acl public-read --cache-control max-age=0,public
55+
env:
56+
AWS_S3_BUCKET: "iiif-guides"
57+
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
58+
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
59+
AWS_REGION: ${{ secrets.AWS_REGION }}
60+
SOURCE_DIR: "_site"
61+
- name: Update deployment status
62+
uses: glenrobson/[email protected]
63+
if: always()
64+
with:
65+
step: finish
66+
auto_inactive: 'false'
67+
token: ${{ secrets.GITHUB_TOKEN }}
68+
status: ${{ job.status }}
69+
deployment_id: ${{ steps.deployment.outputs.deployment_id }}
70+
env_url: "https://guides.iiif.io"

0 commit comments

Comments
 (0)