forked from qiskit-community/qiskit-textbook
-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (51 loc) · 1.44 KB
/
deploy.workflow.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
57
58
59
60
name: build and deploy
on:
# run when action is manually triggered
workflow_dispatch:
inputs:
deploy:
description: 'Deploy ?'
required: false
default: 'false'
# run when a pull request is made
pull_request:
# run on pushes to master or stable branch
push:
branches: [ master, stable ]
jobs:
# job id/key
build-and-deploy:
# job name
name: Build and Deploy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Set up Ruby
uses: actions/setup-ruby@v1
with:
ruby-version: 2.7.x
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install scipy
pip install -r requirements.txt
pip install -r requirements-dev.txt
- name: Install Ruby dependencies
run: |
gem update --system
gem install bundler
- run: make install
- run: make book
- run: make site
- name: Deploy
if: ${{ github.event_name == 'push'|| github.event.inputs.deploy == 'true' }}
run: ./deploy.sh
shell: bash
env:
encrypted_rclone_iv: ${{ secrets.ENCRYPTED_RCLONE_IV }}
encrypted_rclone_key: ${{ secrets.ENCRYPTED_RCLONE_KEY }}
GITHUB_BRANCH: ${{ github.ref }}