-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (40 loc) · 1.5 KB
/
master.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
name: Build
# Controls when the workflow will run
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
inputs:
branch:
required: true
description: branch to deploy
default: main
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Checkout bonpello web repo
uses: actions/checkout@v3
with:
repository: Southern-Frogs/appelo-web-v3
token: ${{secrets.PULL_FROM_COMING_SOON}}
ref: ${{inputs.branch}}
env:
PULL_FROM_COMING_SOON: ${{secrets.PULL_FROM_COMING_SOON}}
- run: npm install
- name: build
run: npm run build
env:
VITE_APP_VERSION: ${{github.sha}}
VITE_SUPABASE_URL: ${{secrets.SUPABASE_URL}}
VITE_PUBLIC_ANON_KEY: ${{secrets.SUPABASE_PUBLIC_ANON_KEY}}
VITE_GOOGLE_ANALYTICS_ID: ${{secrets.GOOGLE_ANALYTICS_ID}}
- name: Deploy with gh-pages
run: |
git remote set-url origin https://git:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
npx gh-pages -d dist -u "github-actions-bot <[email protected]>"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}