-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (39 loc) · 1.49 KB
/
shinyappsio-deployment.yaml
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: shinyappsio-deployment
on:
# triggered when a new release is created
release:
types: [created]
# Triggered manually or when there are changes pushed to the master branch
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11' # Use the appropriate Python version
- name: Install Poetry
uses: abatilo/actions-poetry@v2
# reference: https://testdriven.io/tips/eb1fb0f9-3547-4ca2-b2a8-1c037ba856d8/
- name: Generate requirements.txt
run: |
poetry export --without-hashes --format=requirements.txt > requirements.txt
echo "-e git+https://github.com/Rebekah-Chuang/VizAble.git@main#egg=VizAble" >> requirements.txt
- name: Check if requirements.txt exists
run: ls
- name: Check requirements.txt content
run: cat requirements.txt || echo "Failed to read requirements.txt"
- name: Install dependencies
run: pip install -r requirements.txt
- name: Install rsconnect-python
run: pip install rsconnect-python
- name: Configure rsconnect
run: |
rsconnect add --account rebekah-chuang --name rebekah-chuang --token ${{ secrets.RSCONNECT_TOKEN }} --secret ${{ secrets.RSCONNECT_SECRET }}
- name: Deploy to shinyapps.io
run: |
cd VizAble
ls
rsconnect deploy shiny . --name rebekah-chuang --title VizAble