Skip to content

Commit 68c3505

Browse files
Ashwath KrishnanAshwath Krishnan
Ashwath Krishnan
authored and
Ashwath Krishnan
committed
feat: yaml file for github actions
1 parent f980ec7 commit 68c3505

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

Diff for: .github/workflows/deploy.yaml

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Deploy Shiny App to Posit Connect
2+
3+
on:
4+
push:
5+
branches:
6+
- main # Trigger on pushes to the main branch
7+
8+
jobs:
9+
deploy:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
# Step 1: Check out the repository
14+
- name: Check out repository
15+
uses: actions/checkout@v3
16+
17+
# Step 2: Set up Python
18+
- name: Set up Python
19+
uses: actions/setup-python@v4
20+
with:
21+
python-version: '3.9' # Adjust to your app's Python version
22+
23+
# Step 3: Install dependencies
24+
- name: Install dependencies
25+
run: |
26+
python -m pip install --upgrade pip
27+
pip install rsconnect-python
28+
29+
# Step 4: Authenticate with Posit Connect
30+
- name: Add Posit Connect Account
31+
run: |
32+
rsconnect add \
33+
--account ashwathkris \
34+
--name ashwathkris \
35+
--token ${{ secrets.POSIT_API_KEY }} \
36+
--secret ${{ secrets.POSIT_API_SECRET }}
37+
38+
# Step 5: Deploy to Posit Connect
39+
- name: Deploy Application
40+
run: |
41+
rsconnect deploy shiny Dashboard \
42+
--name ashwathkris \
43+
--title pcha-test

0 commit comments

Comments
 (0)