-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (49 loc) · 1.38 KB
/
CI.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
name: CI
on: [push, pull_request]
jobs:
test:
name: Test and Build Site
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3
bundler-cache: true
- uses: actions/setup-python@v2
with:
python-version: '3.x'
- uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- run: python -m pip install -r requirements.txt
- run: make -j build
- run: make -j test
- run: make -j site-publish.zip
- uses: actions/upload-artifact@v2
with:
name: site-publish
path: site-publish.zip
publish:
if: ${{ github.ref == 'refs/heads/master' }}
name: "Upload Publishable Site"
needs: test
runs-on: ubuntu-latest
concurrency:
group: publish
cancel-in-progress: true
steps:
- uses: actions/[email protected]
with:
name: site-publish
path: site-publish.zip
- uses: "marvinpinto/action-automatic-releases@latest"
with:
title: "Website"
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
prerelease: false
files: site-publish.zip