Skip to content

Commit

Permalink
Migrate from GitHub Pages to Netlify
Browse files Browse the repository at this point in the history
  • Loading branch information
huy-vuong committed Dec 23, 2020
1 parent 3ebf88a commit c18ba18
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
15 changes: 7 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,10 @@ jobs:
CI: true
- name: Build
run: npm run build
- name: Deploy
env:
actions_gh_pages_token: ${{ secrets.ACTIONS_GH_PAGES_TOKEN }}
run: |
git config --global user.name 'Huy Vuong'
git config --global user.email '[email protected]'
git remote set-url origin https://${actions_gh_pages_token}@github.com/huy-vuong/zenme-xie.git
npm run deploy
- name: Deploy to Netlify
uses: jsmrcaga/[email protected]
with:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
NETLIFY_DEPLOY_TO_PROD: true
build_directory: dist
5 changes: 1 addition & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "zenme-xie",
"version": "0.1.0",
"private": true,
"homepage": "https://huy-vuong.github.io/zenme-xie",
"homepage": "https://zenme-xie.netlify.app",
"dependencies": {
"@types/jest": "^26.0.19",
"@types/lodash": "^4.14.165",
Expand All @@ -12,7 +12,6 @@
"@types/react-dom": "^17.0.0",
"axios": "^0.21.1",
"bootstrap": "^4.5.3",
"gh-pages": "^3.1.0",
"hanzi-writer": "^2.3.0",
"husky": "^4.3.6",
"lint-staged": "^10.5.3",
Expand All @@ -36,8 +35,6 @@
"link-module-alias": "^1.2.0"
},
"scripts": {
"predeploy": "npm run build",
"deploy": "gh-pages -d build",
"format": "prettier --write src/**/*.{ts,tsx,css}",
"lint": "eslint src/**/*.{ts,tsx} --fix && tsc --noEmit",
"load-hanzi-dictionary": "node loadHanziDictionary.js",
Expand Down

0 comments on commit c18ba18

Please sign in to comment.