-
-
Notifications
You must be signed in to change notification settings - Fork 11
30 lines (30 loc) · 1.03 KB
/
Deploy.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
name: Deploy website
on:
push:
branches: [ main ]
jobs:
build:
if: github.repository_owner == 'AuroraEditor'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: npm install & build react app
run: |
npm install
npm run build
echo "auroraeditor.com" > build/CNAME
cp build/index.html build/404.html
cp -r src/Assets build/Assets
env:
REACT_APP_API_URL: ${{ secrets.REACT_APP_API_URL }}
REACT_APP_GITHUB_TOKEN: ${{ secrets.REACT_APP_GITHUB_TOKEN }}
- name: Setup GitHub environment
run: |
git config --global user.name 'aurora-care-bear'
git config --global user.email '[email protected]'
git remote set-url --push origin https://aurora-care-bear:[email protected]/AuroraEditor/auroraeditor.com
- name: Push to Github Pages
run: |
git --work-tree build add --all
git commit -m "Automatic Deploy action"
git push origin HEAD:gh-pages --force