This repository has been archived by the owner on Oct 21, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
45 lines (40 loc) · 1.64 KB
/
prod.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
name: Deploy to Prod (https://code-star.github.io/)
on:
push:
branches:
- production
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [10.13.0]
steps:
- name: Checkout 🛎️
uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Install and Build components 🔧
# jq line programmatically removes the homepage property from package.json for production
run: |
jq -r 'del(.["homepage"])' package.json > _.json && mv _.json package.json
yarn install
REACT_APP_STAGE=prod yarn build
# CI: false # true -> fails on warning
# - name: Deploy 🚀
# uses: peaceiris/actions-gh-pages@v3
# with:
# deploy_key: ${{ secrets.ACCESS_TOKEN }} # Access token from the Prod repo, set in Settings > Secrets
# external_repository: code-star/code-star.github.io
# publish_branch: master # The branch the action should deploy to.
# publish_dir: ./build # The folder the action should deploy.
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@4.0.0
with:
token: ${{ secrets.ACCESS_TOKEN }} # Access token from the Prod repo, set in Settings > Secrets
repository-name: code-star/code-star.github.io
branch: master # The branch the action should deploy to.
folder: build # The folder the action should deploy.
clean: true # Automatically remove deleted files from the deploy branch