-
Notifications
You must be signed in to change notification settings - Fork 100
43 lines (36 loc) · 1.06 KB
/
preview.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
name: App Preview Deployment
on:
pull_request:
branches:
- master
jobs:
preview:
runs-on: ubuntu-latest
steps:
- name: Create env file
run: |
touch .env
echo MONGO_DETAILS=${{ secrets.MONGO_DETAILS }} >> .env
echo secret=${{ secrets.secret_key }} >> .env
cat .env
- name: checkout
uses: actions/checkout@master
- name: Login
uses: okteto/login@master
with:
token: ${{ secrets.OKTETO_TOKEN }}
- name: Create namespace
uses: okteto/create-namespace@master
with:
namespace: pr-${{ github.event.number }}-youngestdev
- name: Deploy application
uses: okteto/deploy-stack@master
with:
build: "true"
namespace: pr-${{ github.event.number }}-youngestdev
- name: add comment to PR
uses: okteto/notify-pr@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
message: "Preview environment available at https://fastapi-pr-${{ github.event.number }}-youngestdev.cloud.okteto.net"