Blame view

scripts/ghpages-deploy 615 Bytes
c680f5b4   Administrator   first commit
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
  #!/bin/bash
  echo 'Replace api endpoint with heroku'
  
  cat <<'EOF' >> api.config.ts
  export const MOCK_API: string = "https://whispering-beyond-86495.herokuapp.com";
  EOF
  
  mv src/config/api.config.ts api.config.ts.default
  mv api.config.ts src/config/api.config.ts
  
  git branch -f gh-pages
  git checkout gh-pages
  echo 'Created and Checked out gh-pages branch'
  
  git reset --hard origin/develop
  
  cp -r dist/* .
  echo 'Copied dist/ directory into root dir'
  
  echo 'Tracking files'
  git add -A .
  echo 'Commiting files'
  git commit -a -m 'gh-pages update'
  echo 'Pushing files into gh-pages branch'
  git push origin gh-pages --force